Skip to content

Instantly share code, notes, and snippets.

View JackNicholas's full-sized avatar

Jack Nicholas JackNicholas

View GitHub Profile
@JackNicholas
JackNicholas / gist:9ad3628d308983bf1560
Created January 6, 2015 05:19
deploy script for hugo blog to github user pages using two repos
# based on script at <http://gohugo.io/tutorials/github_pages_blog/>
echo -e "\033[1mDeploying updates to username.github.io...\033[0m"
# go to project folder
cd ~/path/
# build the project.
hugo
@JackNicholas
JackNicholas / gist:42dc5a9b28292ecdb3ed
Created December 30, 2014 10:23
CC BY NC SA for jrn-ebo blog
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">JRN-EBO notes and weblog</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="JackNicholas.github.io" property="cc:attributionName" rel="cc:attributionURL">Jack Nicholas</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="JackNicholas.github.io" rel="dct:source">JackNicholas.github.io</a>.
JRN-EBO notes and weblog by Jack Nicholas is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at JackNicholas.github.io.
http://creativecommons.org/choose/
@JackNicholas
JackNicholas / gist:ee30689a49c43855be38
Created December 30, 2014 10:00
template2 for .gitignore including vim, based on template 1
# Images and Icons #
####################
*.png
*.jpg
*.gif
*.tiff
*.ico
# Fonts #
#########
@JackNicholas
JackNicholas / gist:8144052
Created December 27, 2013 08:16
git config shortcuts and basic set up
shortcuts
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
basic set up
@JackNicholas
JackNicholas / gist:8143973
Created December 27, 2013 08:07
Adding name of current git branch to command line prompt
You can test command line prompts with commands like
export PS1="\W \u \$ “
(then save to .bashrc or .bash_profile if want it permanently)
Make sure that path is up to date.
export PATH=/usr/local/bin:$PATH
The script and commands to add a coloured branch name to the prompt: Save this to .bashrc or .bash_profile
@JackNicholas
JackNicholas / deploy to heroku
Last active December 22, 2015 18:09
command line steps for deploying to heroku
# set up git in local
$ cd into-your-app-root-folder
$ git init
$ git add .
$ git commit -m "initial commit" (or using my shortcut, git ci --all -m "initial commit")
# set up heroku remote
$ heroku create
Creating shrouded-reaches-5937... done, stack is cedar
@JackNicholas
JackNicholas / template for .gitignore
Last active July 16, 2020 12:40
template .gitignore file including ignores for sublime text and bootstrap 3
# Images and Icons #
####################
*.png
*.jpg
*.gif
*.tiff
*.ico
# Fonts #
#########
@JackNicholas
JackNicholas / sublime text 2: finding commands
Created June 5, 2013 11:10
where to find menu item command names on OS X for sublime text 2
* Go to ST menu bar
* Application menu
* sub menu Preferences
* browse packages
* go to folder Default
* open file Main.sublime-menu.
* search for menu item
@JackNicholas
JackNicholas / open file shortcut ST
Last active December 4, 2021 11:57
setting keyboard shortcut to open specific file in sublime text
create a keyboard shortcut in sublime text for a specific file
Open the command palette, search for "Preferences: Key bindings - User", open it and add this code to it:
{
{ "keys": ["ctrl+alt+0"], "command": "open_file", "args": {"file": "/path/to/your/file.txt"} }
}
@JackNicholas
JackNicholas / git-log-stat-command
Created May 15, 2013 17:45
git log command to see which files changed in a commit
git log --stat
the --stat option prints below each commit entry a list of modified files, how many files were changed, and how many lines in those files were added and removed