This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Brunch automatically concatenates all files in your | |
// watched paths. Those paths can be configured at | |
// config.paths.watched in "brunch-config.js". | |
// | |
// However, those files will only be executed if | |
// explicitly imported. The only exception are files | |
// in vendor, which are never wrapped in imports and | |
// therefore are always executed. | |
// Import dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!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++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.js:92 Uncaught Error: Could not find module jquery | |
app.js:62 Uncaught Error: Cannot find module "web/static/js/app" from "/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./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 () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FizzBuzz with module, named functions, and no conditional | |
defmodule Kata do | |
def fizzbuzz( 0, 0, _ ), do: "FizzBuzz" | |
def fizzbuzz( 0, _, _ ), do: "Fizz" | |
def fizzbuzz( _, 0, _ ), do: "Buzz" | |
def fizzbuzz( _, _, x ), do: "#{ x }" | |
def fizzbuzz(n) do | |
fizzbuzz(rem(n, 3), rem(n, 5), n) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p { | |
padding-bottom: 5px; | |
border-bottom: 1px solid #000; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Thanks to Ben Orenstein | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Test-running stuff | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
function! RunCurrentTest() | |
let in_test_file = match(expand("%"), '\(.feature\|_spec.rb\|_test.rb\)$') != -1 | |
if in_test_file | |
call SetTestFile() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rrobots' | |
class Robot3 | |
include Robot | |
def tick events | |
@rapid_fire = 0 if @rapid_fire.nil? | |
@last_seen = 0 if @last_seen.nil? | |
@turn_speed = 3 if @turn_speed.nil? | |
if time - @last_seen > 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Urinal | |
def initialize(occupied, line) | |
@occupied = occupied | |
@line = line | |
end | |
def select | |
scores = stalls.map { |n| [score(n), n] } | |
best = scores.sort.last | |
best.first < 0 ? nil : best.last |
NewerOlder