Skip to content

Instantly share code, notes, and snippets.

View og-shawn-crigger's full-sized avatar

Shawn Crigger og-shawn-crigger

View GitHub Profile
@og-shawn-crigger
og-shawn-crigger / script-puller.js
Created February 6, 2015 21:31
Creates a array of all the scripts and styles and outputs them in json format in the console
//DOM ELEMENTS
clear();
var scripts = [];
var styles = [];
console.groupCollapsed('CSS Links');
@og-shawn-crigger
og-shawn-crigger / favicon.sh
Last active June 15, 2022 23:53
favicon icon generator shell script
#!/bin/bash
# Favicon and Apple Touch Icon Generator
#
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several
# other formats used on modern websites. The following copies are generated:
#
# * apple-touch-icon-144x144-precomposed.png
# * apple-touch-icon-114x114-precomposed.png
# * apple-touch-icon-57x57-precomposed.png
@og-shawn-crigger
og-shawn-crigger / git-rm-delete.sh
Created June 28, 2013 20:22
git rm's all files that were deleted in the current directory
git ls-files -z --deleted | xargs -0 git rm
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@og-shawn-crigger
og-shawn-crigger / gist:5823652
Created June 20, 2013 15:16
Copy your ssh public key to a server from a machine that doesn't have ssh-copy-id If you use Mac OS X or some other *nix variant that doesn't come with ssh-copy-id, this one-liner will allow you to add your public key to a remote machine so you can subsequently ssh to that machine without a password.
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
@og-shawn-crigger
og-shawn-crigger / gist:5745734
Last active December 18, 2015 07:19 — forked from jcanfield/gist:4522006
Copy SSH Keys to Remote Server
# Copy SSH Keys to Remote Server (for password-less access)
#
# More information copying SSH Keys to remote servers can be found at, https://help.ubuntu.com/community/SSH/OpenSSH/Keys.
# Method One is to create a simple script.
# I typically create the script in my ~/.bin and symbolically it to my /usr/local/sbin.
# $ touch ~/.bin/copykeys.sh
# $ chmod +x ~/.bin/copykeys.sh
# $ nano ~/.bin/copykeys.sh
# $ sudo ln -s /home/yourusername/.bin/copykeys.sh /usr/local/sbin/copy-ssh-key
@og-shawn-crigger
og-shawn-crigger / viewsource.sh
Created June 9, 2013 23:40 — forked from jcanfield/viewsource.sh
Bash script to view source of url entered with pygmentized syntax highlighter
#!/bin/bash
# View Website source with syntax highlighting via Pygmentize
echo "Viewing Source for $1"
read -p "USAGE: viewsource http://www.website.com/ (Press Enter To Continue)"
curl -s "$1" | pygmentize -f terminal256 -l html -O style=monokai
exit
@og-shawn-crigger
og-shawn-crigger / .htaccess
Created June 9, 2013 23:39 — forked from jcanfield/.htaccess
Wordpress .htaccess boilerplate to look at
# Apache Configuration file
# www.lighthouselutherie.com/.htaccess
# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
AddDefaultCharset utf-8
# Force UTF-8 for certain file formats.
<IfModule mod_mime.c>
AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
</IfModule>
@og-shawn-crigger
og-shawn-crigger / wp-config.php
Created June 9, 2013 23:38 — forked from jcanfield/wp-config.php
Turns wordpress debugging on creates log in wp-content/ directory if I remember correctly.
@ini_set('display_errors',0); /* define('WP_DEBUG', false); */
define('WP_DEBUG', true); // Turn debugging ON
define('WP_DEBUG_DISPLAY', false); // Turn forced display OFF
define('WP_DEBUG_LOG', true);
@og-shawn-crigger
og-shawn-crigger / functions.php
Created June 6, 2013 15:12 — forked from jcanfield/functions.php
Add body classes to Wordpress <body> tag
// Add more options to the body class on each page (Previous the Ambrosite Plugin)
function fineideas_body_class($classes) {
// If you don't like the class prefixes I have chosen, you can change them here.
$post_name_prefix = 'postname-';
$page_name_prefix = 'pagename-';
$single_term_prefix = 'single-';
$single_parent_prefix = 'parent-';
$category_parent_prefix = 'parent-category-';
$term_parent_prefix = 'parent-term-';