Skip to content

Instantly share code, notes, and snippets.

View leo424y's full-sized avatar

Fly Chang leo424y

View GitHub Profile
@leo424y
leo424y / github-flow.md
Created November 28, 2015 14:12
github flow翻譯及重點整理

1) Create branch

  • master branch的任何一個commit都要是可以發佈的正式版本。
  • branch命名盡量口語化以敘述句為主。(ex. account-auth, frontend-page, backend-add-post)

2) Add commits

  • 描述修正、增加/更改功能使用祈使句,如:fix, add/change。
@leo424y
leo424y / workflowy-with-image.js
Created January 7, 2016 00:30 — forked from drosenstark/workflowy-with-image.js
workflowy-with-image.js
// ==UserScript==
// @name Workflowy markdown tags with images -> images
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@leo424y
leo424y / bootstrapCDN.html
Created August 15, 2016 03:46 — forked from planetoftheweb/bootstrapCDN.html
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">
@leo424y
leo424y / pr.md
Last active October 20, 2016 04:58 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@leo424y
leo424y / gitlfsserver.sh
Last active February 14, 2018 01:09 — forked from voidtuxic/gitlfsserver.sh
Git LFS server config
#!/bin/sh
### BEGIN INIT INFO
# Provides: gitlfsserver
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
@leo424y
leo424y / sonic_pi_examples.txt
Created February 15, 2018 08:35 — forked from darinwilson/sonic_pi_examples.txt
Sonic Pi Examples
##############################################
## Example 1 - play a note
play 60
##############################################
## Example 2 - play 4 random notes
4.times do
play rrand_i(60, 90)
sleep 0.5
@leo424y
leo424y / README.md
Created February 15, 2018 08:36 — forked from xavriley/README.md
Original NES Mario Theme for Sonic Pi

Making Chiptune Music using Sonic Pi v2.0

Warning: this might not work on a RaspberryPi yet

I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.

I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!

Getting the sounds of the NES chip

#Tomtom rhythms found on wikipedia https://en.wikipedia.org/wiki/Rhythm_in_Sub-Saharan_Africa#/media/File:Standard_pattern,_six_beats.png
#form the basis of this piece coded for Sonic PI by Robin Newman, December 2017
l1=(ring 1,0,1,0,1,0,1,0,1,0,1,0)
l2=(ring 0,1,0,1,0,1,0,1,0,1,0,1)
l3=(ring 0,1,0,0,1,1,0,1,0,1,0,1)
l4=(ring 1,0,1,0,1,1,0,1,0,1,0,1)
l=(ring l1,l2,l3,l4)
set :kill,0 #initialise kill flag
live_loop :m do
sleep 1
end
live_loop :a do
sync :m
sample :ambi_dark_woosh
sleep 4
end