Skip to content

Instantly share code, notes, and snippets.

View n8io's full-sized avatar
💭
‾\_(ツ)_/‾

Nate Clark n8io

💭
‾\_(ツ)_/‾
View GitHub Profile
@n8io
n8io / heroku-deployment.md
Last active August 29, 2015 14:25
How to deploy code from git local repo to Heroku app

Heroku deployment via command line

Example app: ione-navigation

  1. Download and install heroku toolbelt (https://toolbelt.heroku.com)
  2. Create a Heroku account (https://signup.heroku.com/login)
  3. From the command line cd to your local repo's directory
  4. heroku login
  5. heroku git:remote -a ione-navigation # adds remote server to current git repo
  6. git push heroku master # to push master branch to heroku
  7. OR git push heroku my-other:master # to push my-other branch to heroku
@n8io
n8io / README.md
Last active December 19, 2016 19:09
JavaScript for creating a screener ribboned image from a movie poster in Plex.

Screen ribbon howto Screener palette chooser Screener ribbon image

@n8io
n8io / fix-npm-directory-permissions.sh
Last active November 3, 2015 21:40
No more sudo npm install -g
sudo chown -R `whoami` /usr/local/bin/npm
sudo chown -R `whoami` ~/.npm
sudo chown -R `whoami` /usr/local/lib/node_modules
@n8io
n8io / terminal-setup.sh
Last active February 7, 2017 22:11
How to get your terminal 'a rockin'
bash <(curl -sL http://bit.ly/bash-setup) # Initializes bash shortcuts
bash <(curl -sL http://bit.ly/ssh-setup) # Registers your ssh keys
bash <(curl -sL http://bit.ly/bash-emoji) # Adds some flare to your default prompt
rand() {
printf $(( $1 * RANDOM / 32767 ))
}
rand_element () {
local -a th=("$@")
unset th[0]
printf $'%s\n' "${th[$(($(rand "${#th[*]}")+1))]}"
}
#Default Prompt
PS1="${YELLOW}\w${GREEN}\$(git_branch)${WHITE}\n$(rand_element 🔥 🚀 👻 ⛄ 👾 🍔 😄 🍰 🐑 💩 😎 📛) $ ";
#!/bin/bash
BASH_PROFILE=http://git.io/vntan
echo Downloading .bash_profile ...
curl -sL $BASH_PROFILE -o ~/.bash_profile
echo ...done.
@n8io
n8io / .bashrc.sh
Last active November 2, 2015 14:22
#!/bin/bash
BASHRC=http://git.io/vlaIW
echo Downloading .bashrc ...
curl -sL $BASHRC -o ~/.bashrc
echo ...done. Make sure to run "source ~/.bashrc" to add to this session.
@n8io
n8io / ssh.sh
Last active August 29, 2015 14:21
Remote bash setup
#!/bin/bash
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
fi
echo Loading ssh keys...
for file in $(find ~/.ssh/id_rsa* ! -name '*.*');
do
ssh-add $file
done
@n8io
n8io / config
Created May 12, 2015 17:48
Disable ssh host checking
Host *
StrictHostKeyChecking no
@n8io
n8io / Atlassian Pull Request - Checkout.js
Last active August 29, 2015 14:19
A bookmarklet for easily copying the git commands to checkout a given pull request in Bitbucket and Stash.
javascript:function() {
var input;
var branch;
var anchorEl;
if(!window.jQuery){
return;
}
branch = jQuery('.aui-iconfont-devtools-branch-small:eq(0)').next().attr('title') || jQuery('.aui-iconfont-devtools-branch-small:eq(0)').next().text();