Skip to content

Instantly share code, notes, and snippets.

View FilmKnurd's full-sized avatar

Andrew Elster FilmKnurd

View GitHub Profile
@FilmKnurd
FilmKnurd / 02.make
Created November 4, 2012 23:16
Homebrew php53 build failure
brew: superenv removed: -I/private/tmp/php53-zKWk/php-5.3.17/main/ -I/private/tmp/php53-zKWk/php-5.3.17/main -I/usr/local/include -g -O2
cc -bundle -bundle_loader /usr/sbin/httpd -L/usr/lib -laprutil-1 -lldap -llber -llber -lexpat -liconv -L/usr/lib -lpq -lsqlite3 -lldap -llber -llber -L/usr/lib -lapr-1 -lpthread -I/usr/include -g -O2 -fvisibility=hidden -L/usr/local/Cellar/libxml2/2.8.0/lib -L/usr/local/Cellar/zlib/1.2.7/lib -L/usr/local/Cellar/curl/7.28.0/lib -L/usr/local/Cellar/jpeg/8d/lib -L/usr/local/Cellar/libpng/1.5.13/lib -L/usr/local/Cellar/freetype/2.4.10/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib -L/usr/local/Cellar/icu4c/49.1.2/lib -L/usr/local/Cellar/mcrypt/2.5.8/lib ext/date/php_date.o ext/date/lib/astro.o ext/date/lib/dow.o ext/date/lib/parse_date.o ext/date/lib/parse_tz.o ext/date/lib/timelib.o ext/date/lib/tm2unixtime.o ext/date/lib/unixtime2tm.o ext/date/lib/parse_iso_intervals.o ext/date/lib/interval.o ext/ereg/ereg.o ext/ereg/regex/regcomp.o ext/ereg/regex/regexec.o ex
@FilmKnurd
FilmKnurd / gist:4039523
Created November 8, 2012 15:37
brew install -v /usr/local/Library/Taps/josegonzalez-php/Formula/php53.rb
This file has been truncated, but you can view the full file.
==> Downloading http://www.php.net/get/php-5.3.17.tar.bz2/from/this/mirror
Already downloaded: /Users/i4veritas/Library/Caches/Homebrew/php53-5.3.17
/usr/bin/tar xf /Users/i4veritas/Library/Caches/Homebrew/php53-5.3.17
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.17 --disable-debug --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/etc/php/5.3 --with-config-file-scan-dir=/usr/local/etc/php/5.3/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-sqlite-utf8 --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-zend-multibyte --enable-bcmath --enable-calendar --wi
@FilmKnurd
FilmKnurd / gist:4042718
Created November 8, 2012 23:55
brew list
autoconf coreutils freetype gnutls libgpg-error libyaml p11-kit python wget
automake ctags gd httperf libicns markdown patchutils readline wine
bash-completion curl gdbm icu4c libpng mcrypt pcre redis xz
casperjs d-bus gettext jasper libtasn1 megalodon phantomjs ruby yasm
cclient dnsmasq git jpeg libtool mongodb pidof sqlite zlib
cmake expat git-flow libgcrypt libxml2 mysql pkg-config tig
// Install jquery-mockjax into vendor
// file: /app/index.html
<!-- @if tests=true -->
<link rel="stylesheet" href="/vendor/qunit/qunit/qunit.css">
<script src="/vendor/qunit/qunit/qunit.js"></script>
<script src="/vendor/jquery-mockjax/jquery.mockjax.js"></script>
// And add it to karma.conf
// file: karma.conf.js
files = [
@FilmKnurd
FilmKnurd / gist:7666247
Created November 26, 2013 21:05
EAK Error output with history location
Running "karma:ci" (karma) task
INFO [karma]: Karma v0.9.8 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.2 (Mac OS X)]: Connected on socket id IWLbOuryIH66v4vPOW9T
DEBUG: 'DEBUG: -------------------------------'
DEBUG: 'DEBUG: Ember : 1.2.0'
DEBUG: 'DEBUG: Ember Data : 1.0.0-beta.2'
DEBUG: 'DEBUG: Handlebars : 1.1.2'
DEBUG: 'DEBUG: jQuery : 1.9.1'
DEBUG: 'DEBUG: -------------------------------'
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return [Ember.Object.create({name: 'One'}), Ember.Object.create({name: 'Two'}), Ember.Object.create({name: 'Three'}];
}
});
@FilmKnurd
FilmKnurd / iframeToImage.js
Created October 29, 2015 16:25
iFrame to image using domvas
var canvas = document.getElementById('canvas-id');
var context = canvas.getContext('2d');
var idoc = document.getElementById('iframe-id').contentWindow.document.body;
domvas.toImage(idoc, function() {
context.drawImage(this, 0, 0, width, height);
// Download
var rawImageData = canvas.toDataURL("image/png;base64");
rawImageData = rawImageData.replace("image/png", "image/octet-stream");
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
model: Ember.computed(function() {
return [{
id: 1
},{
id: 2
}];
import Ember from 'ember';
export default Ember.Component.extend({
_items: [],
pushIt: function() {
this.get('_items').pushObject('Hi ' + Date.now());
},
actions: {
@FilmKnurd
FilmKnurd / components.my-component.js
Created October 24, 2016 22:37
Handle action on model
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
superCoolAction: function() {
this.attrs.superCoolAction();
}
}
});