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
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream | |
# Make sure that you're on your master branch: |
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
#!/usr/bin/env | |
import pandas as pd | |
import numpy as np | |
# Define the diff function to show the changes in each field | |
def report_diff(x): | |
return x[0] if x[0] == x[1] else '{} ---> {}'.format(*x) | |
# We want to be able to easily tell which rows have changes | |
def has_change(row): |
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
Quitting | |
:x Exit, saving changes | |
:q Exit as long as there have been no changes | |
ZZ Exit and save changes if any have been made | |
:q! Exit and ignore any changes | |
Inserting Text | |
i Insert before cursor |
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
/** | |
* Actively wait for an element present and displayed up to specTimeoutMs | |
* ignoring useless webdriver errors like StaleElementError. | |
* | |
* Usage: | |
* Add `require('./waitReady.js');` in your onPrepare block or file. | |
* | |
* @example | |
* expect($('.some-html-class').waitReady()).toBeTruthy(); | |
*/ |
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
//Eg. remove node modules from git history | |
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
echo node_modules/ >> .gitignore | |
git add .gitignore | |
git commit -m 'Removing node_modules from git history' | |
git gc | |
git push origin master --force |
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
Download the zipped version of the Angular.JS Build, which contains both the builds of AngularJS, as well as documentation and other extras. | |
Unzip the Angular.JS docs folder. | |
Download and install Node.JS. | |
Using Mac Terminal, install the npm package http-server globally so that it can be run from the command line. | |
$ sudo npm install -g http-server | |
cd to the Angular.JS docs folder and start-up http-server. | |
$ http-server -a 127.0.0.1 | |
Starting up http-server, serving ./ on: http://127.0.0.1:8080 |
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
$ sudo -s | |
$ export IBM_DB_INCLUDE=/Users/acangiano/sqllib/include | |
$ export IBM_DB_LIB=/Users/acangiano/sqllib/lib32 | |
$ export ARCHFLAGS="-arch i386" | |
$ gem update --system | |
$ gem install ibm_db | |
$ exit |
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
require 'rubygems' | |
# require 'mswin32/ibm_db' | |
# for windows | |
require 'ibm_db' | |
# for linux | |
require 'date.rb' | |
t=Time.now | |
lines=[] | |
filename = 'c://Temp//' +t.strftime("%m%d%Y_%H%M%S")+'.txt' |
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
git-sh-setup # for die | |
git-diff-index -p -M --cached HEAD -- | grep '^+' | | |
grep ddescribe && die Blocking commit because string ddescribe detected in patch |
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
504: Timeout: Ensure that the socket used in nginx upstrem is the same set for uwsgi | |
502: Bad Gateway: Your app is not running, debug your supervisor run app using superviosrctl | |
400: Ensure that you have the ALLOWED_HOSTS= '*' or your domain set |
NewerOlder