Skip to content

Instantly share code, notes, and snippets.

View lukegalea's full-sized avatar

Luke Galea lukegalea

View GitHub Profile
@lukegalea
lukegalea / index.html
Created July 8, 2013 15:20
A CodePen by Luke Galea.
<div data-role="page">
<div data-role="header" data-theme="d">
<img src="http://www.precisionnutrition.com/wordpress/wp-content/themes/pn2012/images/pn_logo.png" style="padding: 5px 5px 0px 10px"/>
</div>
<div data-role="content">
<h1>Thanks for signing up!</h1>
<p>You should receive an email with your free stuff within the next 72 hours.</p>
</div>
</div>
@lukegalea
lukegalea / index.html
Created July 8, 2013 15:09
A CodePen by Luke Galea.
<div data-role="page">
<div data-role="header" data-theme="d">
<h1><img src="http://www.precisionnutrition.com/wordpress/wp-content/themes/pn2012/images/pn_logo.png"/></h1>
</div>
<div data-role="content">
<p>Enter your information below to get the free stuff promised by Dr. John Berardi</p>
<form action="http://get.pn/free" method="post">
<fieldset data-role="fieldcontain">
<label for="firstName">
First Name
App.Route.map () ->
@resource "clients", ->
@resource "client"
@resource 'coaches', ->
@resource 'coach', path: ':coach_id', ->
@resource 'coachedclients', path: '/clients'
App.Coachedclients = Ember.Route.extend
model: (params) ->
@lukegalea
lukegalea / mega_compare.rb
Last active July 7, 2020 17:33
Mega DB Comparison Script for MySQLCompares two databases by doing a checksum on every table.For any tables that differ, a row by row comparison is done.All differences are then HashDiffed to see the actual changes
require 'mysql2'
require 'awesome_print'
require 'hashdiff'
BEFORE_DB = 'alaina_before_upgrade'
AFTER_DB = 'alaina_after_upgrade'
BEFORE = Mysql2::Client.new(host:"127.0.0.1", port: 3307, username: "root", password: '', database: BEFORE_DB, symbolize_keys: true)
AFTER = Mysql2::Client.new(host:"127.0.0.1", port: 3307, username: "root", password: '', database: AFTER_DB, symbolize_keys: true)
@lukegalea
lukegalea / index.html
Created March 11, 2013 02:12
A CodePen by Luke Galea.
<img id="face" src="http://www.precisionnutrition.com/wordpress/wp-content/uploads/2008/10/Phil.jpg"/>
<div id="fbdiv">
<div id="fb-root">
<fb:like href="http://precisionnutrition.com/about" send="false" width="450"
show_faces="false" data-layout="button_count"></fb:like>
</div>
</div>
<div id="login">
<p><button onClick="loginUser();">Login</button></p>
@lukegalea
lukegalea / landing_canvas_mask.html
Created October 19, 2012 17:36
AlphaMaskFilter fade in
<!DOCTYPE html>
<html>
<head>
<title>Ashley Madison</title>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no">
<script type="text/javascript" src="javascripts/libs/easeljs/easeljs-0.5.0.min.js"></script>
<script type="text/javascript" src="javascripts/libs/easeljs/filters/Filter.js"></script>
<script type="text/javascript" src="javascripts/libs/easeljs/filters/AlphaMaskFilter.js"></script>
@lukegalea
lukegalea / alphamask_failure.html
Created October 16, 2012 15:58
Attempted radial fade in
<!DOCTYPE html>
<html>
<head>
<title>Ashley Madison</title>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no">
<script type="text/javascript" src="javascripts/libs/easeljs/easeljs-0.5.0.min.js"></script>
<script type="text/javascript" src="javascripts/libs/easeljs/filters/Filter.js"></script>
<script type="text/javascript" src="javascripts/libs/easeljs/filters/AlphaMapFilter.js"></script>
@lukegalea
lukegalea / templateCompiler.js
Created August 8, 2012 01:25
JADE Embedded Handlebars Precompiler
// Renders JADE -> Handlebars, Precompiles and outputs a single template bundle
// For example, https://github.com/lukegalea/recur_in/blob/master/templates/task.jade
// Dependencies
var handlebars = require('handlebars');
var fs = require('fs');
var async = require('async');
var jade = require('jade');
var uglify = require('uglify-js');
var encoder = require('./encoder');
console.log("Loading Nude Detection Script");
var loadNude = function(){
var nude = (function(){
// private var definition
var canvas = null,
ctx = null,
resultFn = null,
// private functions
initCanvas = function(){
@lukegalea
lukegalea / jqm_guiders.html
Created June 23, 2011 19:56
Issue with Guiders and Jquery Mobile
<!DOCTYPE html>
<html><head>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"/>
<title>Title</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
<link rel="stylesheet" type="text/css" href="./guider.css">