Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| # https://github.com/kylestetz/slang | |
| @bass (adsr (osc saw) 0 0.5 0 0.5) + (filter lp 20) | |
| play @bass (rhythm [8n 16n 8n 16n r16n]) (notes [e1 e2 e1 d2]) | |
| @pluck (adsr (osc saw) 0 0.05 0 0) | |
| play @pluck (rhythm [16n]) (notes [e4 d4 e4 g4]) | |
| @doot (adsr (osc square) 0 0.04 0.1 0) + (filter lp 20) | |
| play @doot (rhythm [r16n 16n 16n 16n]) (notes [e2 e2 e2 d3 g3 a3]) |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| font: 14px sans-serif; | |
| } | |
| .axis path, .axis line { | |
| fill: none; |
| if defined?(Rails) | |
| lib = File::join(Rails.root, 'lib') | |
| ActiveSupport::Dependencies.autoload_paths << lib | |
| Dir[lib + '/**'].each do |f| | |
| class_name = File.basename(f).sub(/\.rb$/, '').camelize | |
| ActiveSupport::Dependencies.explicitly_unloadable_constants << class_name | |
| end | |
| end |
| class Post < ActiveRecord::Base | |
| attr_accessible :body, :price, :title | |
| validates_presence_of :title | |
| validates_length_of :title, minimum: 10 | |
| validates_presence_of :body | |
| validates_numericality_of :price, greater_than: 0 | |
| end |
| config.yml |
| use strict; | |
| use warnings; | |
| use Time::HiRes qw/time/; | |
| use Term::ANSIColor; | |
| $SIG{INT} = 'print_score'; | |
| my $from = defined $ARGV[0] ? $ARGV[0] : 100; | |
| my $to = defined $ARGV[1] ? $ARGV[1] : 999; | |
| die "Need from <= to ($from > $to)" if($from > $to); |
| <link rel="canonical" href="http://yourdomain.com{{ page.url | replace:'index.html','' }}" /> |
| require 'rubygems' | |
| require 'net/imap' | |
| require 'kconv' | |
| require 'pit' | |
| require 'logger' | |
| class ImapFetcher | |
| def initialize(pit_name) | |
| @pit = Pit.get( |