- https://canviz.com/hands-on-creating-a-simple-web-server-in-kubernetes/
- http://docs.heptio.com/content/tutorials/lamp.html
- https://medium.com/devopslinks/deploy-your-first-scaleable-php-mysql-web-application-in-kubernetes-33ed7ab66595
- https://dzone.com/articles/microservices-on-kubernetes
- https://dzone.com/articles/working-with-microservices-amp-kubernetes
- https://clemenssiebler.com/deploying-internal-applications-with-private-ips-on-azure-kubernetes-service-aks/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" Make sure you use single quotes | |
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align | |
Plug 'junegunn/vim-easy-align' | |
" Any valid git URL is allowed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import event | |
from sqlalchemy.engine import Engine | |
@event.listens_for(Engine, "connect") | |
def set_sqlite_pragma(dbapi_connection, connection_record): | |
cursor = dbapi_connection.cursor() | |
cursor.execute("PRAGMA foreign_keys=ON") | |
cursor.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a TOML document. Boom. | |
title = "TOML Example (v0.4.0)" | |
#------------------------------ Comments ------------------------------ | |
# This is a full-line comment | |
key = "value" # This is a comment at the end of a line | |
#--------------------------- Key/Value Pair --------------------------- |
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Box<T> is for single ownership. | |
Rc<T> is for multiple ownership. | |
Arc<T> is for multiple ownership, but threadsafe. | |
Cell<T> is for “interior mutability” for Copy types; that is, when you need to mutate something behind a &T. |
In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"os/user" | |
"path/filepath" | |
"strings" | |
"time" | |
) |
$ vim /etc/profile.d/envvars.sh
export SCALA_ENV="prod"
export SPARK_HOME="/home/sparkuser/spark"
export PATH=$PATH:$SPARK_HOME