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
__author__ = 'kvaranasi' | |
import csv | |
import os | |
import re | |
rootdir = os.getcwd() | |
rootdir += '/lib/fathead' | |
for subdir, dirs, files in os.walk(rootdir): | |
for file in files: |
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
local ret_status="%(?:%{$fg_bold[green]%}🤖 :%{$fg_bold[red]%}💩 )" | |
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[yellow]%}😡 " | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] 😇 " |
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
String file contents |
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
String file contents |
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
# This will destroy any local modifications. | |
# Don't do it if you have uncommitted work you want to keep. | |
git reset --hard 0d1d7fc32 | |
# Alternatively, if there's work to keep: | |
git stash | |
git reset --hard 0d1d7fc32 | |
git stash pop | |
# This saves the modifications, then reapplies that patch after resetting. | |
# You could get merge conflicts, if you've modified things which were |
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
#!/usr/bin/env python2.7 | |
from __future__ import print_function | |
import commands | |
import os | |
import stat | |
from gitlab import Gitlab | |
def get_clone_commands(token, repo_root): | |
con = Gitlab("http://gitlab.your.domain", token) |
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
# Fork your repo example, the following is link to mine | |
https://github.com/kaushik94/privacybadgerchrome | |
# On your terminal | |
git clone https://github.com/kaushik94/privacybadgerchrome | |
# Install and run tests, then checkout another branch | |
# and name it in a way that resonates with the issue being solved | |
git checkout -b <new-branch-name-withou-these-brackets> |
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
# At the end of this file | |
alias <new-alias-without-quotes>='<existing-command-in-quotes>' |
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 idea | |
The idea was to have a frontend for a streaming data of json documents and a way to notify of any updates/deletes. So technically we want the browser to do just one thing - update the frontend as new document comes in or if something changes and we wanted it to be good at just that. | |
## React ? Seriously ? | |
We chose react to build this since it deals well with one thing in particular - How to update the DOM from state A to state B in the most optimal way(less read/writes). You can control the DOM without exactly telling how to reach there, but just by telling what it should look like in an object-oriented fashion. Plus its a perfect library for frontend. Other options like angular and JQuery fall into the category of frameworks which let you manipulate the DOM "easily". This is sometimes bad since we just want the template to render the data in a particular fashion once we let it know what the data is. Refer to "Why so much code?" section for more detail. | |
## Ohh but .. | |
Note : that I am not talking |
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
def reverseDict(somedict): | |
newdict = {} | |
for each in somedict: | |
for one in somedict[each]: | |
newdict[one] = each | |
return newdict | |
something = {'Bob':['Harry','Jenkins', 'Onion', 'Fred', 'Earl', 'Sam'], | |
'Wayne':['Wallace', 'David', 'Eel', 'Perkins', 'Fruit', 'Angela'], | |
'Jeff':['Aaron', 'Cameron', 'Keith', 'Winston', 'Geoff', 'Wayne'] |