Skip to content

Instantly share code, notes, and snippets.

View quicksnap's full-sized avatar
🎮
GitHub has statuses?!

Dan Schuman quicksnap

🎮
GitHub has statuses?!
View GitHub Profile
COPY & PASTE!!!
//Name: Derrik Fleming
//Class: CS162
//Prof: Karla Fant
#include <iostream>
using namespace std;
@quicksnap
quicksnap / gist:2625584
Created May 7, 2012 02:49 — forked from anonymous/gist:2625583
Test Gist DIFF
//Name: Derrik Fleming
//Class: CS162
//Prof: Karla Fant
#include <iostream>
#include <fstream>
#include <stdlib.h>
using namespace std;
@quicksnap
quicksnap / post-merge.rb
Created September 1, 2012 22:23 — forked from jmeridth/post-merge.rb
Somewhat hacky post-merge hook for rails bundle/migration updates
#!/usr/bin/env ruby
def is_mac?
RUBY_PLATFORM.downcase.include?("darwin")
end
def getc_input
# http://stackoverflow.com/a/174967/250407
# http://bit.ly/PMZdKv
begin
@quicksnap
quicksnap / gist:4113949
Created November 19, 2012 21:13
Nodejitsu error
info: Starting app mouseparty
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to deploy the app
error:
error: tar exited with code: 2
error: Error output from Haibu:
error:
error: Error: tar exited with code: 2
error: at ChildProcess.Tar.init (/root/haibu-orchestra/node_modules/haibu/lib/haibu/repositories/tar.js:58:26)
<script>
$(document).ready(function() {
// Hidden elements
$('.mainbox-title').hide();
$('.left-column').hide();
$('.top-tools-container').hide();
$('.content-tools').hide();
$('.breadcrumbs').hide();
// Main content area padding/width adjustments
// Remove white space between table cells
$('.wysiwyg-content table').attr('cellspacing', 0).attr('cellpadding', 0);
// 100% Width content area. Useful for making full-width backgrounds that
// span the page, and centered width-restrained inner content. Current
// width is 978px for reference.
// Remove these lines to return to normal width.
$('.container-right').width('100%');
$('.container-right #header').width('978px').css('margin', '0 auto');
var protocol = 'http://';
function checkFlash() {
var flashinstalled = false;
if (navigator.plugins) {
if (navigator.plugins["Shockwave Flash"]) {
flashinstalled = true
} else if (navigator.plugins["Shockwave Flash 2.0"]) {
flashinstalled = true
}
@quicksnap
quicksnap / gist:4567602
Last active December 11, 2015 07:38
Usage: `newalias ALIAS_NAME "alias commad" Example: # newalias fuckyou "echo 'No, fuck you.' "
newalias() {
echo "\n" >> ~/.aliases
echo "alias $1=\"$2\"" >> ~/.aliases
. ~/.aliases
}
#!/bin/bash
#
# God
#
# chkconfig: 2345 85 15
# description: start, stop, restart God
#
# Also consider adding this line (kills god weekly) to your crontab (sudo crontab -e):
#
# # deicide is painless