Skip to content

Instantly share code, notes, and snippets.

@isaacd9
isaacd9 / Gitignore.sh
Last active March 4, 2017 08:35
Pull a specific git ignore from Github with `gitignore`
function _gitignore(){
data=`curl -sf "https://raw.githubusercontent.com/github/gitignore/master/$1.gitignore"`;
if [ $? -eq 0 ]; then
echo "\n${data}" >> .gitignore;
else
echo "gitignore for $1 not found"
fi
}
function _gitignore_search(){

Keybase proof

I hereby claim:

  • I am isaacd9 on github.
  • I am idiamond (https://keybase.io/idiamond) on keybase.
  • I have a public key ASCtfkGEH27Qf6hNU30o_IwZnGYiXAUQbw_JGx-q-pm7Wgo

To claim this, I am signing this object:

@isaacd9
isaacd9 / bashrc_addition.sh
Last active March 15, 2017 20:05
Have Paul Graham talk to u when u open a new shell
# Add to bashrc
`curl -s https://instagraham.io/api/ | jq '"\(.quote) - \(.url)"' > /etc/motd &`
@isaacd9
isaacd9 / .inspiration.sh
Last active April 14, 2017 22:04
Some inspiration for your shell. `wget` the raw version of this in `~` and add `source ~/.inspiration` to your .bashrc.
#!/bin/bash
# Install jq (brew install jq or sudo apt-get install jq)
# Source this from your ~/.bashrc or ~/.profile to add the `pg` and `inspiration` aliases to your shell!
_pg() {
data=`curl -s https://instagraham.io/api/ | jq '"\(.quote) - \(.url)"' | fold -w 80 -s`
echo -e "\033[1;31m$data\033[0m"
}
@isaacd9
isaacd9 / -
Created September 16, 2017 19:18
#!/usr/local/bin/node
const sleep = (strNum) => {
return new Promise((resolve, reject) => {
num = parseInt(strNum);
setTimeout((num) => {
sorted.push(num);
resolve();
}, num, num);
});
@isaacd9
isaacd9 / -
Created September 16, 2017 19:20
#!/usr/local/bin/node
const sleep = (strNum) => {
return new Promise((resolve, reject) => {
num = parseInt(strNum);
setTimeout((num) => {
sorted.push(num);
resolve();
}, num, num);
});
@isaacd9
isaacd9 / -
Created September 16, 2017 19:20
#!/usr/local/bin/node
const sleep = (strNum) => {
return new Promise((resolve, reject) => {
num = parseInt(strNum);
setTimeout((num) => {
sorted.push(num);
resolve();
}, num, num);
});
@isaacd9
isaacd9 / -
Created September 16, 2017 19:44
#!/usr/local/bin/node
const sleep = (strNum) => {
return new Promise((resolve, reject) => {
num = parseInt(strNum);
setTimeout((num) => {
sorted.push(num);
resolve();
}, num, num);
});
@isaacd9
isaacd9 / -
Created September 16, 2017 19:45
#!/usr/local/bin/node
const sort = (arr) => {
const sorted = [];
const sleep = (strNum) => {
return new Promise((resolve, reject) => {
num = parseInt(strNum);
setTimeout((num) => {
sorted.push(num);
resolve();
@isaacd9
isaacd9 / -
Created September 16, 2017 19:47
#!/usr/local/bin/node
const sort = (arr) => {
const sorted = [];
const sleep = (strNum) => {
return new Promise((resolve, reject) => {
num = parseInt(strNum);
setTimeout((num) => {
sorted.push(num);
resolve();