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
const state = {} | |
... | |
const myReducer = ({ action, data }) => { | |
switch (action) { | |
case 'A_STRING_REPRESENTING_AN_ACTION': | |
return { | |
...state, | |
//some modifications based on 'data' | |
} | |
default: |
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
#!/bin/sh | |
print_pgp_key() { | |
cat <<-EOF | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFDAy/0BEAC8I5bw5gLQqHKx5JCacYcXFL6AZowl3qIOTxo5yfBl8CepNpWY | |
OOERvIUJb17WehhhbWOo9WjpBalDXBRtI1NvfArewOT8fLm7BdhYe8U45moBfkYi | |
xFtNrPw3pdIltHQISrB8PufhliN8obQuq0rcxYV8NblvYo4gIGNjBfO1QGvBNmp7 | |
kBtjlAuZguScZmUTdPOwfv8fqN52X9tCv1ahQk1hg8XG9YwW0vXb5z93jkLXBb5b |
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
# ref : https://github.com/slackapi/python-slackclient | |
import sys | |
import uuid | |
import slack | |
from lib.py.core.config import Config | |
slack_token = Config()["slackbot"]["user_token"] | |
authorized_users = Config()["slackbot"]["authorized_user_ids"] | |
client = slack.WebClient(slack_token) |
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
@echo off | |
set PYTHONPATH=%~dp0..\.. | |
python %~dp0..\py\dependencies.py %* | |
REM cli dep %* |
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
class Portfolio: | |
AGE=29 # Starting year | |
CTC=1000000 # Total CTC, it's assumed that only 75% comes in hand | |
HIKE=100000 # Assuming 1 lakh hike every year | |
RETURNS_PER_ANNUM = 1.10 # Assuming investment returns are 10% per annum | |
EXPENSES_PER_MONTH = 40000 # Assuming monthly expenses are 40k, inflation taken into account while calculating though | |
INFLATION=1.07 # Assuming 7% inflation | |
ASSETS=0 # Assuming there's no investment so far | |
DURATION=50 # Assuming death after 50 years |
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
// ==UserScript== | |
// @name Emby - local path | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://localhost:8096/* | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// ==/UserScript== |
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
cd "C:%HOMEPATH%\.IntelliJIdea*\config" | |
rmdir "eval" /s /q | |
del "options\options.xml" | |
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f | |
:: It is Highly Advised to Purchase the JetBrain Softwares | |
:: This is only for the case You just want to Extend the | |
:: Trial Period and Evaluate the IDE for some more Time |
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
apt-get install git | |
add-apt-repository ppa:nathan-renniewaldock/flux | |
apt-get install git | |
sudo apt-get install python-pip | |
git clone "https://github.com/xflux-gui/fluxgui.git" |
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
def mainFile(): | |
f = open("CodeChefInput.txt", "r") | |
f.readline() | |
def nextLine(): | |
line = f.readline() | |
elems = line.split() | |
if len(elems) < 2: | |
return int(line) | |
else: | |
for idx in range(len(elems)): |
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
introspection philanthropist antidote strive ambidextrous retrospective precursors introvert gerontocracy ambiguous braggart aggravate entice alleviate adorn equilibrium abhor connote endeavor agile renovate curriculum malevolent amalgamate xenophile (zen-uh-fahyl) drowsiness stray disrobe acumen suffocate sporadic scent sequence audacious affinity animosity heterogeneous fragile legacy massacre appease submerge adulteration combustion premature shunned anguish apt conceal grumble indigenous offhand loll correlate somersault abscond edible extinguish inquest surcharge accolade conjoin timid opaqueness disallow abide impermeable console warrant acclaimed extinct reminiscent catalyst embezzle shallow clientele brittle negligent affable salvage moribund relapse dangle ascend asterisk yarn arrogance divergence allegiance vigorous dwarf livid rejuvenation fragrant judicious hospitable odor scribble ameliorate poseur sawdust narcissism dullard succumb sluggard flop ingest reiterate derivative defer eloquence clot |