Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
sudo apt-get install build-essential autoconf libtool pkg-config | |
sudo apt-get install clang libc++-dev | |
sudo apt install apt-transport-https curl gnupg -y | |
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg | |
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list | |
sudo apt update && sudo apt install bazel | |
sudo apt-get install python3-dev | |
sudo apt update && sudo apt full-upgrade | |
go install github.com/bazelbuild/buildtools/buildifier@latest |
load("@pip//:requirements.bzl", "requirement") | |
py_binary( | |
name = "server", | |
srcs = [":server.py"], | |
data = ["server.proto"], | |
deps = [ | |
requirement('grpcio'), | |
], | |
) |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
// This file goes to: public/firebase-messaging-sw.js | |
// Reference: https://stackoverflow.com/a/69207889/13091479 | |
// Scripts for firebase and firebase messaging | |
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js"); | |
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js"); | |
// Initialize the Firebase app in the service worker by passing the generated config | |
const firebaseConfig = { | |
apiKey: "YOURDATA", |
class KMP: | |
def partial(self, pattern): | |
""" Calculate partial match table: String -> [Int]""" | |
ret = [0] | |
for i in range(1, len(pattern)): | |
j = ret[i - 1] | |
while j > 0 and pattern[j] != pattern[i]: | |
j = ret[j - 1] | |
ret.append(j + 1 if pattern[j] == pattern[i] else j) |