View output
1 2 3 4 5 6 7 8 9 10
➜ my-test git:(master) ✗ ember --version
version: 0.1.5
Could not find watchman, falling back to NodeWatcher for file system events
node: 0.10.29
npm: 2.1.8
➜ my-test git:(master) ✗ ember g controller about
version: 0.1.5
Could not find watchman, falling back to NodeWatcher for file system events
installing
create app/controllers/about.js
View dagre-d3.js
1 2 3 4 5 6 7 8 9 10
;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var global=self;/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
View chain.ex
1 2 3 4 5 6 7 8 9 10
defmodule Chain do
def counter(next_pid) do
receive do
n ->
send next_pid, n + 1
end
end
 
def create_processes(n) do
last = Enum.reduce 1..n, self,
View gist:6bbae64b2afe1f32441e
1 2 3 4 5
** (UndefinedFunctionError) undefined function: :xmlElement.name/1 (module :xmlElement is not available)
:xmlElement.name({:xmlElement, :credit, :credit, [], {:xmlNamespace, [], [{'xsd', :"http://www.w3.org/2001/XMLSchema"}, {'xsi', :"http://www.w3.org/2001/XMLSchema-instance"}]}, [current_observation: 2], 2, [], [{:xmlText, [credit: 2, current_observati
on: 2], 1, [], 'NOAA\'s National Weather Service', :text}], [], '/Users/bcardarella/Dropbox/projects/elixir/issues', :undeclared})
(issues) lib/issues/weather.ex:15: anonymous fn/2 in Weather.parse_nodes/1
(elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
View weather.ex
1 2 3 4 5 6 7 8 9 10
defmodule Weather do
require Record
Record.defrecord :xmlElement, Record.extract(:xmlElement, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecord :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl")
 
def parse_url(url) do
{:ok, response} = HTTPoison.get(url)
{ xml, _rest} = :xmerl_scan.string :erlang.bitstring_to_list(response.body)
nodes = :xmerl_xpath.string('/current_observation/*', xml)
{ response, xml, nodes }
View gist:9e7ad1f4d23e0c16accf
1 2
|> Enum.map &_normalize(&1)
|> Enum.sort(&(String.length(&2) <= String.length(&1)))
View method.rb
1 2 3 4 5 6 7 8 9 10
# Ruby Challenge
#
# Access the original method signature of a class's
# instance method after a module has been prepended
# into that class
 
require 'minitest/autorun'
 
module A
def foo
View book.md
  1. Setting up Development Environment
    1. Installing Node.js
    2. Intalling Ember-CLI
    3. Installing PhantomJS
    4. Confirmation of Installation
      1. Generate a project
      2. Run web server & visit page
  2. Introduction to Ember-CLI
    1. Overview of project structure
      1. app/
View gist:7a8cee6b86bd7dd5c54d
1 2 3 4 5 6 7 8 9 10
# Remap prefix to C-a
set -g prefix C-a
unbind C-b
 
#shorten escape time
set -sg escape-time 1
 
# Use 1-based indexes
set -g base-index 1
setw -g pane-base-index 1
View gist:8a0ff3e56881324b7c74
1 2 3 4 5 6 7 8 9 10
{
"productSegments": [
{
"id": 1,
"segment": "AB"
}
],
"projects": [
{
"id": 1,
Something went wrong with that request. Please try again.