Programming | git | OS(Linux) | Networking | Public cloud | IAC | Containers | orchastration | config-mgmt | CI/CD | olly | Miscellaneous | databases | Web |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12-factor app | git workflows | bash commands | L3/L7 protos | cloud specific concepts | teraform | Docker handon | k8, swarm | Ansible | Travis/Jenkins | Prometheus | Big data | RDBMS/SQL | HTML, CSS, Ajax |
OOPs | branching strategy | file system organisa |
This file contains 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
alias gdx="git diff --diff-algorithm=patience --color --ws-error-highlight=all --break-rewrites --find-renames --find-copies-harder --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change" |
This file contains 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 django.conf import settings | |
from django.core.wsgi import get_wsgi_application | |
from django.conf.urls import url | |
from django.http import HttpResponse | |
settings.configure(DEBUG=True) | |
def index(request): |
This file contains 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 random | |
import sys | |
def pop_random(deck): | |
i = random.randint(0, len(deck) - 1) | |
return deck.pop(i) | |
def hand_total(hand): |
This file contains 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
{ | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "SF Mono Regular", | |
"font_size": 10, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
], | |
"indent_guide_options": | |
[ |
This file contains 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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
init-hook='import sys; sys.path.append("../../")' | |
# Profiled execution. |
This file contains 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
function service(serviceEndpoint, defaultParams){ | |
if (defaultParams===undefined){ | |
defaultParams = {}; | |
} | |
var wrapper = function(query, success, error){ | |
var returnObj = {}; | |
var promise = $.ajax({ | |
url: serviceEndpoint, | |
data: $.extend(query, defaultParams), |
Use following to view pretty git logs
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
Create an alias for above command
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
Source: https://coderwall.com/p/euwpig
This file contains 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
The ceramics teacher announced on opening day that he was dividing the class into two groups. | |
All those on the left side of the studio, he said, would be graded solely on the quantity of work they produced, all those on the right solely on its quality. | |
His procedure was simple: on the final day of class he would bring in his bathroom scales and weigh the work of the “quantity” group: 50 pounds of pots rated an “A”, 40 pounds a “B”, and so on. | |
Those being graded on “quality”, however, needed to produce only one pot — albeit a perfect one — to get an “A”. | |
Well, came grading time and a curious fact emerged: the works of highest quality were all produced by the group being graded for quantity. | |
It seems that while the “quantity” group was busily churning out piles of work-and learning from their mistakes — the “quality” group had sat theorizing about perfection, and in the end had little more to show for their efforts than grandiose theories and a pile of dead clay |
This file contains 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
filetype on | |
filetype plugin on | |
call pathogen#infect() | |
setl et ts=4 sw=4 softtabstop=4 autoindent | |
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class | |
autocmd BufWritePre * :%s/\s\+$//e | |
noremap <Up> <nop> | |
noremap <Down> <nop> | |
noremap <Left> <nop> | |
noremap <Right> <nop> |
NewerOlder