View prepare-commit-msg
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 | |
# This way you can customize which branches should be skipped when prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
View com.googlecode.iterm2.plist
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AdjustWindowForFontSizeChange</key> | |
<true/> | |
<key>AllowClipboardAccess</key> | |
<false/> | |
<key>AnimateDimming</key> | |
<false/> |
View agnoster-custom.zsh-theme
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# Make sure you have a recent version: the code points that Powerline |
View MergeSort.js
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
function MergeSort(arr) { | |
let len = arr.length, // number of items in the array | |
middle, // middle of the array | |
left, // left side of the array | |
right, // right side of the array | |
// Arrays with 0 or 1 elements don't need sorting | |
if (len < 2) { | |
return arr |
View QuickSort.js
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
// Find a "pivot" element in the array to compare all other | |
// elements against and then shift elements before or after | |
// pivot depending on their values | |
function QuickSort(arr, left = 0, right = arr.length - 1) { | |
let len = arr.length, | |
index | |
if(len > 1) { | |
index = partition(arr, left, right) |
View InsertionSort.js
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
function InsertionSort(arr) { | |
let len = arr.length, // number of items in the array | |
value, // the value currently being compared | |
i, // index into unsorted section | |
j; // index into sorted section | |
for(i = 1; i < len; i++) { | |
// store the current value because it may shift later |
View uber-home.js
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
'use latest'; | |
const Twitter = require('twit'); | |
const request = require('request'); | |
let client; | |
let destination = 'destination'; | |
// Generates random integer | |
const getRandomInt = (min, max) => { |