Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View JonathanBeech's full-sized avatar

Jonathan Beech JonathanBeech

View GitHub Profile
@JonathanBeech
JonathanBeech / Alias's to use in the terminal
Created January 19, 2013 10:48
alias's for the terminal created by Jonny Beech
# Jonny Beech's alias's and functions
alias desk='cd ~/Desktop'
alias docs='cd ~/Documents'
alias sites-'cd ~/Sites'
alias ren='mv'
alias up='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
@JonathanBeech
JonathanBeech / gist:4556330
Created January 17, 2013 14:35
A list of useful terminal commands
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder
This is another terminal script to be put in the terminal allows the mac to display an absolute path in the Finder window.
➜ ~ defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
➜ ~ killall Finder
#this is a shell script that allows you to have the folder and file paths to be displayed at the top of your finder window
@JonathanBeech
JonathanBeech / gist:3487834
Created August 27, 2012 11:57
css: simple reset
html,body,blockquote,code,h1,h2,h3,h4,h5,h6,p,pre{margin:0;padding:0}
button,fieldset,form,input,legend,textarea,select{margin:0;padding:0}
fieldset{border:0}
a,a *{cursor:pointer}
div{margin:0;padding:0;background-color:transparent;text-align:left}
hr,img{border:0}
applet,iframe,object{border:0;margin:0;padding:0}
button,input[type=button],input[type=image],input[type=reset],input[type=submit],label{cursor:pointer;}
ul,li{list-style:none;margin:0;padding:0;}
strong{font-weight:bold;}

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@JonathanBeech
JonathanBeech / gist:3403282
Created August 20, 2012 11:12
Terminal: list of useful zsh alias's and functions
alias doc='cd ~/Documents'
alias desk='cd ~/Desktop'
alias ren='mv'
alias up='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
alias ls='ls -F'
alias l='ls'
@JonathanBeech
JonathanBeech / custom-posts-helper.php
Created August 20, 2012 08:26 — forked from GreenGeorge/custom-posts-helper.php
Wordpress: Functions to quickly automate making custom post types in wordpress
<?php
// ***** Declare function that buids the post type
function add_post_type($name, $args = array() ) {
add_action('init',function() use($name, $args) {
// make post type name capitalized
$upper = ucwords($name);
// make name acceptable
@JonathanBeech
JonathanBeech / Default (OSX).sublime-keymap
Created August 20, 2012 08:12
Sublime Text: sublime keymap
[
{ "keys": ["ctrl+super+n"], "command": "new_snippet" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["n", "n"], "command": "advanced_new_file",
"context": [{"key": "setting.command_mode", "operand": true}]},
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
@JonathanBeech
JonathanBeech / Side Bar.sublime-menu
Created August 17, 2012 06:40
Sublime Text: sidebar enhancement settings
[
{"id": "side-bar-files-open-with",
"children":
[
// Espresso
{
"caption": "Espresso",
"id": "side-bar-files-open-with-espresso",
@JonathanBeech
JonathanBeech / gist:3288912
Created August 7, 2012 20:08 — forked from padolsey/gist:527683
Javascript: Detect ie
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@JonathanBeech
JonathanBeech / gist:3288881
Created August 7, 2012 20:05
Javascript: JQueryPubSub
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);