Skip to content

Instantly share code, notes, and snippets.

View leo424y's full-sized avatar

Fly Chang leo424y

View GitHub Profile
@darinwilson
darinwilson / SonicPiDrumMachine
Last active March 2, 2024 20:11
Sonic Pi Drum Machine
#########################################
## 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)
@caweidmann
caweidmann / .eslintrc
Last active May 31, 2016 05:21
The "C-Dawg linter". A comprehensive eslintrc file that implements best practices and strict coding standards.
{
"env": {
"browser": true,
},
"globals": {
"jQuery": false,
"$": false,
"_": false
},
"rules": {
@anvaka
anvaka / 00.Intro.md
Last active November 3, 2025 03:55
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
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"
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 3, 2025 11:24
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@motephyr
motephyr / gist:0662b8ff09896b5dde3d
Created July 12, 2015 06:22
RubyGem 如何運作的?
大部分的時候,RubyGem都可以直接使用。
但是Ruby有個大問題是:如果出錯的話,你很難找到為什麼出錯。
通常在使用Gem的時候你不會遇到什麼問題,如果運氣不好碰到的話,Google也沒什麼用
如果你不知道Gem到底是怎麼和程式一起運作的話,你就會花很多時間在debug上。
Gem的運作有點像在變魔術,不過花點時間研究,它其實很好懂的。
gem install做了什麼事?
一個Ruby gem只是一些打包起來的code,加上一些額外的data。
@planetoftheweb
planetoftheweb / bootstrapCDN.html
Created July 8, 2015 01:25
Bootstrap 3 CDN Page Code
<!-- 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">
@emlyn
emlyn / dancing dream.rb
Last active February 15, 2018 09:16
Toby's Sonic Pi songs
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
@cverbiest
cverbiest / gistpost
Last active May 2, 2020 19:02
gistpost
#!/bin/bash
# Purpose : post a file as github gist
# Author : Carl Verbiest
typeset local
script=$0
script_dir=${script%/*}
script=${script##*/}
@protrolium
protrolium / ffmpeg.md
Last active October 10, 2025 18:15
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: