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
""" Here is a simple context manager for managing your locks using Redlock library.""" | |
import datetime | |
import random | |
import sys | |
import time | |
from contextlib import contextmanager | |
from redlock import RedLock | |
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 argparse | |
parser = argparse.ArgumentParser(description='') | |
parser.add_argument('--start', '-s', help="") | |
argv = vars(parser.parse_args()) | |
# Some Examples | |
parser.add_argument('--kill', '-k', action='store_true', help="Kill running page downloaders") | |
parser.add_argument('--store', default='all') | |
parser.add_argument("--store", required=True) | |
parser.add_argument('--count', '-c', type=int ) |
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
#!/bin/bash | |
# description: Starts and stops Solr production | |
PIDFILE=/var/run/solr.pid | |
SOLR_HOME=/usr/share/solr | |
START_COMMAND="$SOLR_HOME/bin/solr start -p 8984 -noprompt -m 1g" | |
NAME="Solr" | |
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
# Do not list .pyc files | |
alias ls='ls --color=auto --hide=*.pyc' | |
# Because vim is colorful | |
alias vi='vim' | |
# Command Prompt | |
PS1='[\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]]$ ' | |
# All the user executables can be symlinked to this directory |
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
syntax on | |
set clipboard=unnamed | |
set autoindent | |
set ft=crontab | |
filetype on | |
set ruler | |
set hlsearch |
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
print("Hello to the world of Gists!") | |
print("This line is added from terminal after cloning the gist.") |