Skip to content

Instantly share code, notes, and snippets.


Claudia Hernández claudiahdz

View GitHub Profile
View uber-home.js
'use latest';
const Twitter = require('twit');
const request = require('request');
let client;
let destination = 'destination';
// Generates random integer
const getRandomInt = (min, max) => {
View InsertionSort.js
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 QuickSort.js
// 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,
if(len > 1) {
index = partition(arr, left, right)
View MergeSort.js
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 agnoster-custom.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
# agnoster's Theme -
# A Powerline-inspired theme for ZSH
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](
# Make sure you have a recent version: the code points that Powerline
View com.googlecode.iterm2.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
claudiahdz / prepare-commit-msg
Last active Feb 3, 2017
View prepare-commit-msg
# 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)
BRANCH_NAME=$(git symbolic-ref --short HEAD)
You can’t perform that action at this time.