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/local/bin/python3 | |
from pycookiecheat import chrome_cookies | |
from requests_html import HTMLSession | |
import requests | |
import click | |
import time | |
import pync | |
@click.command() |
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
from sh import git, open | |
branch = git('rev-parse', '--abbrev-ref', 'HEAD').strip() | |
location = git('remote', 'get-url', 'origin').split('git@github.com:')[1].split('.git')[0] | |
url = 'https://github.com/%s/compare/%s?expand=1' % ( | |
location, | |
branch | |
) | |
open(url) |
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 click | |
import os | |
import glob | |
@click.command() | |
@click.option('--dry/--no-dry', default=False) | |
@click.argument('root_path', type=click.Path()) | |
@click.argument('replace_strings', nargs=-1) | |
def replace_all(dry, root_path, replace_strings): |
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 gpu='git push -u origin $(git symbolic-ref --short HEAD)' | |
alias gitbackup='git checkout -b backup/`git rev-parse --abbrev-ref HEAD`/`date +%Y%m%d-%H%M%S` && git checkout -' | |
alias acommit='git add -A :/ && git commit -a' | |
alias changedfiles='git diff --name-status master..`git rev-parse --abbrev-ref HEAD`' | |
alias rebasemaster='git checkout master && git pull && git checkout - && git rebase master' | |
alias updatebranch='git fetch && git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)' | |
alias changed='git diff HEAD' | |
alias gitbranch="git for-each-ref --color=always --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' | tail -15" | |
killport () { | |
if [ -z "`lsof -i tcp:${1:-5000}`" ] |
OlderNewer