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
#!/bin/bash | |
# Find all files to be committed (respects .gitignore, staged files only) | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep -vE '^(vendor|node_modules|\.git/)') | |
found=0 | |
matchfiles=() | |
MSG="🚫 Commit aborted: @nocheckin found in staged files. Fix." |
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
# .bashrc | |
function _makefile_targets { | |
local curr_arg; | |
local targets; | |
# Find makefile targets available in the current directory | |
targets='' | |
if [[ -e "$(pwd)/Makefile" ]]; then | |
targets=$( \ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main(int argc, char *argv[]) | |
{ | |
int opt; | |
while ((opt = getopt(argc, argv, "ilw")) != -1) { | |
switch(opt) { |
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
https://coderwall.com/p/dhftbw/compile-command-t-vim-plugin-with-homebrew-and-macvim | |
cd ~/.vim/bundle/command-t/ruby/command-t/ | |
/usr/local/Cellar/ruby/<ruby_version>/bin/ruby extconf.rb | |
/usr/local/Cellar/ruby/<ruby_version>/bin/rake make |
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
<?php | |
$unsorted = [43,21,2,1,9,24,2,99,23,8,7,114,92,5]; | |
function quick_sort($array) | |
{ | |
// Find the length of the array | |
$length = count($array); | |
// If the count is less than or greater to one, return the array. | |
// At that point there's nothing to sort. |