Skip to content

Instantly share code, notes, and snippets.

💭
working on datafruits

Tony Miller mcfiredrill

💭
working on datafruits
Block or report user

Report or block mcfiredrill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9730665
FacebookWrapper = double('facebook')
FacebookWrapper.stub(:new) { double('graph') }
likes = Array({"category"=>"Media/news/publishing",
"name"=>"Zigg(Kawaii Culture Media)",
"created_time"=>"2014-03-17T05:52:31+0000",
"id"=>"486930078012376"})
graph.stub(:likes).with(:id).and_return(likes)
View posts.js.coffee
Fortchan12.PostsRoute = Ember.Route.extend model: -> Ember.RSVP.hash posts: @get('store').findAll 'post' newPost: @get('store').createRecord 'post'
View posts.hbs
<h2>make a new post</h2>
<form {{action 'create' newPost on="submit"}}>
{{#if isSaving}}
<p>saving post...</p>
{{/if}}
<p>{{input type="text" value=name}}</p>
<p>{{textarea value=body}}</p>
<button type="submit">Create</button>
</form>
View gist:b498ec3f8f61f2e6a312
🍒tony@moguya ~/src/elixir_stuff$ elixir chat.ex
** (CompileError) chat.ex:74: Chat.Room.__struct__/0 is undefined, cannot expand struct Chat.Room
(elixir) src/elixir_map.erl:55: :elixir_map.translate_struct/4
(elixir) src/elixir.erl:195: :elixir.quoted_to_erl/3
(elixir) src/elixir_lexical.erl:17: :elixir_lexical.run/2
🍒tony@moguya ~/src/elixir_stuff$ elixir -v
Elixir 0.14.2
@mcfiredrill
mcfiredrill / gist:472678f7deed7382b7d8
Created Aug 5, 2014
platform privacy policies/terms of service
View gist:472678f7deed7382b7d8
View gist:4fc7a8dbe1e0370c0d01
io
unicode/utf8
math
bytes
bufio
syscall
strconv
time
reflect
os
@mcfiredrill
mcfiredrill / PACKAGES
Created Aug 19, 2014
liquidsoap PACKAGES
View PACKAGES
# Edit this file by (un)commenting the libraries that you (don't) want to
# build in order to get the corresponding features in liquidsoap.
# The default file has every dependency enabled.
# It is certain that you don't need everything.
# If you don't know why you should have something, uncomment it,
# especially if it does not build for some reason.
# It is useless to add savonet packages that are not listed below,
# like ocaml-fetch, ocaml-smbclient, etc. These are not dependencies of
View wat.coffee
class Foo
constructor: () ->
@a = 'hey'
wat: =>
console.log(@a)
w = new Foo
w.wat
View gist:abce3ac4f5172524b07b
#!/usr/bin/env ruby
Bundler.require
require_relative './playlist_download_job'
R = Redis.new
next_song = R.lpop "datafruits.fm:playlist"
if next_song != nil
puts next_song
else
View gist:264dd1baa00db9d4e84f
** [out :: 192.168.50.4] / [38/708]
** [out :: 192.168.50.4] -
** [out :: 192.168.50.4] \
** [out :: 192.168.50.4] |
** [out :: 192.168.50.4] /
** [out :: 192.168.50.4] -
** [out :: 192.168.50.4] \
** [out :: 192.168.50.4] |
** [out :: 192.168.50.4] /
** [out :: 192.168.50.4] -
You can’t perform that action at this time.