This gist is updated daily via cron job and lists stats for npm packages:
- Top 1,000 most depended-upon packages
 - Top 1,000 packages with largest number of dependencies
 - Top 1,000 packages with highest PageRank score
 
| ######################################### | |
| ## Sonic Pi Drum Machine | |
| ## coded by Darin Wilson | |
| ## | |
| use_bpm 95 | |
| in_thread(name: :drum_machine) do | |
| # choose your kit here (can be :acoustic, :acoustic_soft, :electro, :toy) | 
| { | |
| "env": { | |
| "browser": true, | |
| }, | |
| "globals": { | |
| "jQuery": false, | |
| "$": false, | |
| "_": false | |
| }, | |
| "rules": { | 
| alias rs="rails s" | |
| alias rc="rails c" | |
| alias rd="rails db" | |
| alias rdp="rake db:phoenix" | |
| alias rdm="rake db:migrate" | |
| alias rdm0="rake db:migrate VERSION=0" | |
| alias rdmr="rake db:migrate:redo" | |
| alias rdr="rake db:rollback" | |
| alias rdk="rake db:kapow" | |
| alias rr="rake routes" | 
| 大部分的時候,RubyGem都可以直接使用。 | |
| 但是Ruby有個大問題是:如果出錯的話,你很難找到為什麼出錯。 | |
| 通常在使用Gem的時候你不會遇到什麼問題,如果運氣不好碰到的話,Google也沒什麼用 | |
| 如果你不知道Gem到底是怎麼和程式一起運作的話,你就會花很多時間在debug上。 | |
| Gem的運作有點像在變魔術,不過花點時間研究,它其實很好懂的。 | |
| gem install做了什麼事? | |
| 一個Ruby gem只是一些打包起來的code,加上一些額外的data。 | 
| <!-- HEAD SECTION --> | |
| <!-- IE Edge Meta Tag --> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <!-- Viewport --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- Minified CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | 
| use_bpm 120 | |
| use_synth :dsaw | |
| p = [[:c4,:M7],[:a4,:m7],[:d4,:m7],[:g4,:dom7],[:e4,:m7],[:a4,:dom7],[:d4,:m7],[:g4,:dom7]] | |
| in_thread do | |
| sleep 8 | |
| 12.times do | |
| sample :loop_breakbeat, rate: sample_duration(:loop_breakbeat)/4 | |
| sleep 4 | 
| #!/bin/bash | |
| # Purpose : post a file as github gist | |
| # Author : Carl Verbiest | |
| typeset local | |
| script=$0 | |
| script_dir=${script%/*} | |
| script=${script##*/} |