| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |
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
| sudo: required #is required to use docker service in travis | |
| language: php #can be any language, just php for example | |
| services: | |
| - docker # required, but travis uses older version of docker :( | |
| install: | |
| - echo "install nothing!" # put your normal pre-testing installs here |
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
| import paramiko | |
| k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem") | |
| c = paramiko.SSHClient() | |
| c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
| print "connecting" | |
| c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k ) | |
| print "connected" | |
| commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ] | |
| for command in commands: | |
| print "Executing {}".format( command ) |
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
| @startuml | |
| title: HTTP Request on ECS\n | |
| actor user | |
| participant Client | |
| participant Route53 | |
| box LoadBalancer #LightBlue | |
| participant ALB |
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
| #!/usr/bin/env python | |
| import sys | |
| class InvalidInput(Exception): | |
| pass | |
| class Calculator: | |
| def add(self, *args): |
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
| #!/usr/bin/env python | |
| import re | |
| import sys | |
| class KoreanNumberConverter: | |
| big_units = { | |
| '조': 1000000000000, | |
| '억': 100000000, | |
| '만': 10000, |
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
| # Backup files | |
| #https://explainshell.com/explain?cmd=rsync+-azuv+--delete+--progress+--exclude+%27node_modules%27 | |
| rsync -auvhp --delete --exclude=node_modules [source] [destination] | |
| # Remove all node_modules folders | |
| # https://explainshell.com/explain?cmd=find+.+-name+%22node_modules%22+-type+d+-prune+-exec+rm+-rf+%27%7B%7D%27+%2B | |
| find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
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
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
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
| import sys | |
| from logbook import Logger, StreamHandler | |
| stream_handler = StreamHandler(sys.stdout) | |
| def main(): | |
| log = Logger("My Awesome Logger") | |
| log.warn("This is too cool for stdlib") |