Skip to content

Instantly share code, notes, and snippets.

@joefiorini
joefiorini / rails.nix
Created September 18, 2014 06:16
Nix Expression for Running Rails Apps
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "717-app";
buildInputs = [ libiconv openssl ruby21 postgresql git nodejs ];
src = "/src/717";
builder = builtins.toFile "builder.sh" ''
set -e
source $stdenv/setup
test-hsp.hs:27:8:
Couldn't match type `XMLType (ServerPartT IO)' with `XML'
Expected type: XMLGenT (ServerPartT IO) XML
Actual type: XMLGenT (ServerPartT IO) (XMLType (ServerPartT IO))
In the return type of a call of `genElement'
In the first argument of `unXMLGenT', namely
`(genElement
(Nothing, fromStringLit "html")
[]
main.hs:136:7:
Couldn't match expected type `Data.Text.Internal.Lazy.Text'
with actual type `StringType m1'
The type variable `m1' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
In the second argument of `($)', namely
`template
"Home"
()
(genElement
@joefiorini
joefiorini / Brocfile.js
Created June 12, 2014 01:42
My setup for building an Angular.js app with Broccoli & grunt
var ngMin = require('broccoli-ng-min');
var uglify = require('broccoli-uglify-js');
var compileSass = require('broccoli-ruby-sass');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var findBowerTrees = require('broccoli-bower');
var env = require('broccoli-env').getEnv();
var compileES6 = require('broccoli-es6-concatenator');
var app = 'app/scripts';
ack
adobe-source-code-pro-fonts
autoconf
automake
bash
binutils
bison
btrfs-progs
bzip2
chromium
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
name: require('./package.json').name,
legacyFilesToAppend: [
'jquery.js',
'handlebars.js',
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
name: require('./package.json').name,
legacyFilesToAppend: [
'jquery.js',
'handlebars.js',
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
name: require('./package.json').name,
legacyFilesToAppend: [
'jquery.js',
'handlebars.js',
# Ansible Linode external inventory script settings
#
[linode]
# API calls to Linode are slow. For this reason, we cache the results of an API
# call. Set this to the path you want cache files to be written to. Two files
# will be written to this directory:
# - ansible-Linode.cache
# - ansible-Linode.index
function loadScript(module) {
var head = document.getElementsByTagName("head")[0];
var script = document.createElement("script");
return new RSVP.Promise(function(resolve, reject) {
script.language = "javascript";
script.src = module.url;
script.onload = function() {
resolve(module);
};
head.appendChild(script);