Skip to content

Instantly share code, notes, and snippets.

View johnmichel's full-sized avatar
👻
☕️

John Michel johnmichel

👻
☕️
View GitHub Profile
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>c:log</title>
<meta http-equiv="Content-Type" content="text/xhtml+xml; charset=utf-8" />
<meta http-equiv="Refresh" content="86400" />
<meta name="verify-v1" content="03vYOCHSB0pI40Ihad5a/UxwepMxjnAd94XpxTYpSTQ=" />
<link rel="stylesheet" href="/css/index.css" type="text/css" title="default.white" />
<script type="text/javascript" src="/scripts/concert.js"></script>
// holy crap. this is old. and probably broken.
double total = 0;
for (int i=0; i <= 1000; i++) {
total = total + (int)Math.pow(i,i);
if (i == 1000)
System.out.println(Math.pow(1000,1000));
System.out.println(total);
}
@johnmichel
johnmichel / gist:337683
Created March 19, 2010 15:58
mod_deflate enabled .htaccess
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|htm|html|php)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
$('#pictures').hover(function() {
$('div.overlay-background, div.overlay').slideDown('slow', function() {
//Animation Complete
});
});
@johnmichel
johnmichel / mail.js
Created April 14, 2010 15:24
A mostly-spamproof way of letting people compose an email to you
// Usage:
// <a href="javascript:mail('hello','gmail','com','email!','this begins the message ')">Email Me</a>
function mail(user, host, tld, subject, message)
{
email = 'mailto:' + user + '@' + host + '.' + tld + '?subject=' + subject + '&body=' + message;
window.location = email;
}
@johnmichel
johnmichel / chromium_updater.scpt
Created April 18, 2010 15:50
AppleScript for updating to the latest version of Chromium
--Developed by Dominic Barnes
--Email: dom@dombarnes.com
--http://dombarnes.com
--Modified by John Michel
--http://www.cowbird.org
--Version 0.5
--find latest build number (old: from http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac/LATEST)
set the_source to do shell script "curl http://build.chromium.org/f/chromium/snapshots/Mac/LATEST"
// jquery invert plugin
// by paul irish
// some (bad) code from this css color inverter
// http://plugins.jquery.com/project/invert-color
// some better code via Opera to inverse images via canvas
// http://dev.opera.com/articles/view/html-5-canvas-the-basics/#insertingimages
// and some imagesLoaded stuff from me
// http://gist.github.com/268257
@johnmichel
johnmichel / gist:402598
Created May 16, 2010 02:51
Disables the login sound for Ubuntu
sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
@johnmichel
johnmichel / iecheck.css
Created May 18, 2010 16:00
Checks for the devil of all browsers
/* could be done using jQuery's .css() function */
#browserupgrade {
background-color: #f0ffaf;
}
@johnmichel
johnmichel / getYear.js
Created May 18, 2010 19:05
Gets the current year
function getYear() {
var now = new Date();
return now.getFullYear();
}