Skip to content

Instantly share code, notes, and snippets.

View JesseHerrick's full-sized avatar

Jesse Herrick JesseHerrick

View GitHub Profile
@JesseHerrick
JesseHerrick / it's_dynamite!.txt
Last active December 22, 2015 14:29
The notes for my presentation on dynamite.
Intro:
- Name + Music
# Quote!
"If I have a thousand ideas and only one turns out to be good, I am satisfied." - Alfred Nobel
- One good idea is better than none!
- About Dynamite
- Created by Alert Nobel
- Yes, he also instituted the Nobel Peace Prize.
@JesseHerrick
JesseHerrick / gist:6118385
Created July 31, 2013 00:46
Get URL parameters.
var params = function () {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}()
@JesseHerrick
JesseHerrick / gist:6025141
Created July 17, 2013 22:32
Formula for vertically centering things with CSS.
.center {
width: 500px;
position: absolute;
left: 50%;
margin-left: -250px; /* Exactly half of the width. */
}
/*
Full Formula:
margin-left = width/2 if left = 50%
@JesseHerrick
JesseHerrick / replace.cpp
Last active December 19, 2015 12:19
A simple replace example written in C++. Plus... fancy error control!
#include <iostream>
#include <string>
using namespace std;
// declare main function with argv abilities
int main(int argc, char* argv[]) {
// first string
string statement;
@JesseHerrick
JesseHerrick / gist:5893906
Created June 30, 2013 04:56
Perfect CSS Center
.centered {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
}
$ gem install hyde-ftp
@JesseHerrick
JesseHerrick / AIRInstall
Last active December 17, 2015 04:08
Creating the installer for an Adobe AIR application.
// make key
adt –certificate -cn SelfSigned 1024-RSA sampleCert.pfx samplePassword
// make installer
adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air
HelloWorld-app.xml HelloWorld.html AIRAliases.js
// to include whole directory use this command
dir\
// with dir being the directory name
@JesseHerrick
JesseHerrick / MWFix.php
Created April 21, 2013 16:21
A quick fix for MediaWiki cookies error.
session_save_path("tmp");
@JesseHerrick
JesseHerrick / glowingtext.css
Last active December 15, 2015 08:49
Make text have a 'glow' effect.
.glowingtext {
text-shadow: none;
-webkit-transition: .25s linear 0s;
-moz-transition: .25s linear 0s;
-o-transition: .25s linear 0s;
transition: .25s linear 0s;
}
.glowingtext:hover {
text-shadow: -1px 1px 8px #ffffff, 1px -1px 8px #ffffff;
}
document.write('.fadein {
opacity: 0.5;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.fadein:hover {
opacity: 1;
}')