Skip to content

Instantly share code, notes, and snippets.

View giltotherescue's full-sized avatar

Gil Hildebrand giltotherescue

View GitHub Profile
@giltotherescue
giltotherescue / percent-change.php
Created February 24, 2012 15:19
Calculate Percentage Change
<?
/**
Calculates the percentage change between two numbers.
Useful for showing how much traffic has changed from one time period to the next.
*/
$percentChange = function ($cur, $prev) {
/**
* ================================
* = FIREBASE DATABASE STRUCTURE
* ================================
*/
/**
* ASSESSMENTS
*/
{
/*
pushId = new key created by Firebase push() via Angularfire .$add()
"order" properties indicate objects that should be sortable
*/
programs: {
[programId:pushId]: {
angular.module('airfoil.services-auth', [])
.factory('Auth', function ($ionicPlatform, $q, $state, $injector, $timeout, AutoComplete, $rootScope, es,
$cordovaFacebook, $cordovaDevice, $cordovaDialogs, $cordovaPush, $cordovaBackgroundGeolocation,
$analytics) {
var self = this;
self.initialized = false;
self.AuthData = {};
self.ProfileData = {};
self.PushData = null;
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqdLSS1OfqT89YGaqo2UfB4xvT9HbtCLypAkYmUB/Z/ut+aL/nRqMFLaRJk9vNqNt7K+7BIc1peefR2h9YTHD7ZWapSNv2ef1Tb09vCfa9e6y1n1kkbO2SF9RvZ32S2W8i4A66nl1tgXnQdYpjnUHH1oitT3BVpxfjv2OJl776N4ypWyNmyhh2j7vB5wyoHTvgoMY6K/cT0BKQo7TiMs5HlDGORVkOA73qTDlYuWu4/rJwxFXdLm/UrWWZnvEwH2+FkZ92+dgcr5rmZuOPHyxnkwVfCXzKuC+lPlxHKYzQ9H+fINLIDSVVYGTkZw4a480T/Sdt8RtKymcFKNAHzA1V gil@ninja.local
curl -I https://analytics.mvb.me/index.php
HTTP/1.1 302 Found
Date: Wed, 05 Oct 2016 18:19:46 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=d8bef16fc21edd726a7ef21645293f3171475691586; expires=Thu, 05-Oct-17 18:19:46 GMT; path=/; domain=.mvb.me; HttpOnly
X-Powered-By: PHP/5.3.3-7+squeeze19
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
#] curl -I https://analytics.mvb.me/
HTTP/1.1 302 Found
Date: Wed, 05 Oct 2016 14:25:29 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=d898f19d7200fc89395869dab3b559e481475677529; expires=Thu, 05-Oct-17 14:25:29 GMT; path=/; domain=.mvb.me; HttpOnly
X-Powered-By: PHP/5.3.3-7+squeeze19
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
When it comes to your goals and aspirations in the areas of physique alteration, sports performance, and health, it is very important to target your time and efforts doing what works, and avoid doing what doesn’t. You care too much about your appearance, health, and performance to settle for a suboptimal product.
Renaissance Periodization was founded with the understanding that science is the surest path to the truth, and in this field, to results. Our approach is the rigorous application of scientific principles to nutrition and training. Everything we do is built on a foundation of peer-reviewed literature and experimentally-confirmed theory.
At Renaissance, formulas, calculations, and literature reviews replace gurus, hunches, and attachments to tradition.
We know what works and we want to help you reach your goals.
@giltotherescue
giltotherescue / hullagraph.php
Created January 28, 2013 19:18
Replace line 448 and below with this code if you want to rename the Source and Original stacks based on the title of the parent postcard.
<?
} else if ($node['parent']->getProperty('type') == 'meta') {
if (in_array($node['parent']->getProperty('parent'), array('Source', 'Original'))) {
$parent_mod = Module::getModuleById($node['adjective']->getProperty('title'));
$new_stack['title'] = escapeForDisplay($parent_mod->lens_module_title);
}
$new_stack['url'] = implode('/', array(
'stacks',
strtolower($this->getNoun(true, $node['parent']->getProperty('parent'))),
urlencode(strtolower($node['parent']->getProperty('title'))),
<?
preg_match_all("#[\"|']http://the.squidoocdn.com/(.+[\.v[\d]+]?\.css)[\"|']#", file_get_contents($argv[1]), $css);
print_r($css);
preg_match_all("#[\"|']http://the.squidoocdn.com/(.+[\.v[\d]+]?\.js)[\"|']#", file_get_contents($argv[1]), $js);
print_r($js);