Skip to content

Instantly share code, notes, and snippets.

View st23am's full-sized avatar

James Smith st23am

  • Adobe / Frame.io
  • Cincinnati
  • X @st23am
View GitHub Profile
def test
str = "this is a test of new pastie"
# print out the test msg
puts str
end
@st23am
st23am / escript_crash
Created May 31, 2014 01:17
escript crash
./homunculus "test/**/*.coffee"
{"init terminating in do_boot",{undef,[{'Elixir.Mix.Utils',last_modified,[<<24 bytes>>],[]},{'Elixir.Homunculus.Watcher','-initial_state/1-fun-0-',1,[{file,"lib/watcher.ex"},{line,32}]},{'Elixir.Enum','-map/2-lc$^0/1-0-',2,[{file,"lib/enum.ex"},{line,967}]},{'Elixir.Homunculus.Watcher',initial_state,1,[{file,"lib/watcher.ex"},{line,32}]},{'Elixir.Agent.Server',init,1,[{file,"lib/agent/server.ex"},{line,7}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
import {Socket} from "phoenix";
import {Ember} from "ember";
// let socket = new Socket("/ws")
// socket.join("topic:subtopic", {}, chan => {
// })
let App = Ember.Application.extend({});
export default App;
app.js:92 Uncaught Error: Could not find module jquery
app.js:62 Uncaught Error: Cannot find module "web/static/js/app" from "/"
@st23am
st23am / Phoenix.js
Created May 14, 2015 00:04
require.define error in minified / unminified phoenix.js
!function() {
"use strict";
var e = "undefined" != typeof window ? window : global;
if ("function" != typeof e.require) {
var t = {}, n = {}, i = function(e, t) {
return {}.hasOwnProperty.call(e, t)
}, r = function(e, t) {
var n, i, r = [];
n = /^\.\.?(\/|$)/.test(t) ? [e, t].join("/").split("/") : t.split("/");
for (var o = 0, s = n.length; s > o; o++)
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '
@st23am
st23am / fix Bundle Exec pain
Created June 20, 2011 15:13
No longer have to be/bundle exec
### In Terminal cd into project dir ####
bundle install --binstubs # Creates a bin folder with all your project binaries
### .rvmrc ###
export PATH=./bin:${PATH//:\.\/bin:}
@st23am
st23am / .vimrc
Created July 27, 2011 03:54
Vimrc after lion
call pathogen#runtime_append_all_bundles()
set nocompatible
set hidden
set tabstop=4
set softtabstop=4
set expandtab
set cursorline
let mapleader = ","
@st23am
st23am / gist:1262850
Created October 4, 2011 21:23
Toggle highlight search
" Toggle search results with spacebar
map <Space> :set hlsearch!<cr>
@st23am
st23am / multiple_static_dirs.coffee
Created January 24, 2012 23:40
Serve multiple directions of static assets in node.js with express
express = require('express')
app = module.exports = express.createServer()
app.configure('development', ->
app.use(express.static("./public"))
app.use('/test', express.static("./test/public"))
#serve up specs.js when were in development for jasmine dom tests in the browser
app.get(hem.options.specsPath, hem.specsPackage().createServer())
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))
)