Skip to content

Instantly share code, notes, and snippets.

@jdeagle
jdeagle / gist:462d92cfcc29c7d2db6c
Last active August 29, 2015 14:18
OSX install mcrypt
http://stackoverflow.com/questions/9343151/where-is-php-ini-in-mac-os-x-lion-thought-it-was-in-usr-local-php5-lib
Answers from @Cronk and @Justin got me close on Mac OS X 10.9 Mavericks. In fact, on my system the /etc/php.ini file was missing completely, and it wasn't until I ran phpinfo() on the web server that I observed there was no configuration file. Copying the file from /etc/php.ini.default and adding the fully qualified path to the mcrypt.so library to the config file solved the problem:
cp /etc/php.ini.default /etc/php.ini
Then in /etc/php.ini add the following line (using the correct path to your mcrypt.so file):
extension="/usr/local/Cellar/php54-mcrypt/5.4.29/mcrypt.so"
Then restart Apache2:
var VirtualScroll = function() {
var vs = {};
var numListeners, listeners = [], initialized = false;
var touchStartX, touchStartY;
// [ These settings can be customized with the options() function below ]
@jdeagle
jdeagle / All-Shape-Types.markdown
Created January 16, 2015 21:58
All Shape Types
@jdeagle
jdeagle / SassMeister-input-HTML.html
Created January 7, 2015 14:42
Generated by SassMeister.com.
<section>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
@jdeagle
jdeagle / index.js
Created November 28, 2014 18:03
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
var Router = require('routes');
var router = Router();
var callback = function () {
console.log("woot");
};

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@jdeagle
jdeagle / SassMeister-input.scss
Created September 23, 2014 22:08
Icon Fonts as Sass List - Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
$icon-names : (twitter '\e001') (github '\e002');
%ico-font-base {
font-family: "ico-font";
speak: none;
@jdeagle
jdeagle / SassMeister-input-HTML.html
Last active August 29, 2015 14:06
Generated by SassMeister.com.
<div>
<div class="col">This is some content</div>
<div class="other-col">This is some more content</div>
</div>
@jdeagle
jdeagle / SassMeister-input-HTML.html
Last active August 29, 2015 14:05
Generated by SassMeister.com.
<h4>Three up</h4>
<div class="three-up-class">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
<h4>using mixin</h4>
<div class="three-up-mixin">
<div>1</div>
@jdeagle
jdeagle / pie.js
Created June 4, 2014 18:22
draw a circle loader
createPie : function (game, w, h) {
console.log("create pie", w, h, this);
var mask = game.add.bitmapData(w, w),
bmd = game.add.bitmapData(w, w),
canvas = bmd.canvas,
context = bmd.ctx,
size = 270,
degreesToRadians = function (degrees) {
return (degrees * Math.PI) / 180;
};