Skip to content

Instantly share code, notes, and snippets.

View dtinth's full-sized avatar
🎶
𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪

Thai Pangsakulyanont dtinth

🎶
𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪
  • @bemusic                 @creatorsgarten                 @eventpop                 @showdownspace                 @spacetme                @wonderfulsoftware                
  • Krungthepmahanakhonamonrattanakosinmahintharayutthayamahadilokphopnoppharatratchathaniburiromudomratchaniwetmahasathanamonphimanawatansathitsakkathattiyawitsanukamprasit (Bangkok), Thailand
  • YouTube @dtinth
View GitHub Profile
@dtinth
dtinth / dtinth.json
Created June 5, 2014 01:33
Powerline theme for Tmux
{
"default_module": "powerline.segments.common",
"segment_data": {
"uptime": {
"before": "⇑ "
},
"external_ip": {
"before": "ⓦ "
},
"date": {
@dtinth
dtinth / dtinth.json
Created June 5, 2014 01:31
Powerline color scheme for Vim
{
"name": "Default color scheme",
"groups": {
"background": { "fg": "white", "bg": "gray2" },
"background:divider": { "fg": "gray6", "bg": "gray2" },
"mode": { "fg": "darkestgreen", "bg": "brightgreen", "attr": ["bold"] },
"modified_indicator": { "fg": "brightyellow", "bg": "gray4", "attr": ["bold"] },
"paste_indicator": { "fg": "white", "bg": "mediumorange", "attr": ["bold"] },
"readonly_indicator": { "fg": "gray6", "bg": "gray4" },
"branch": { "fg": "gray9", "bg": "gray4" },
@dtinth
dtinth / dtinth.json
Created June 5, 2014 01:30
Powerline color scheme for Vim
{
"name": "Default color scheme for terminal prompts",
"groups": {
"background:divider": { "fg": "gray5", "bg": "gray0" },
"session": { "fg": "black", "bg": "gray10", "attr": ["bold"] },
"date": { "fg": "gray6", "bg": "gray1" },
"time": { "fg": "gray10", "bg": "gray2", "attr": ["bold"] },
"time:divider": { "fg": "gray5", "bg": "gray2" },
"email_alert": { "fg": "white", "bg": "brightred", "attr": ["bold"] },
"email_alert_gradient": { "fg": "white", "bg": "yellow_orange_red", "attr": ["bold"] },
@dtinth
dtinth / HyperHackathon.md
Last active August 29, 2015 14:01
My Attempt at Hyper Hackathon
access_token = "..."
j = JSON.parse(`curl "https://graph.facebook.com/PeaceandOrderMaintainingCommand/feed?access_token=#{access_token}&limit=1000"`); nil
-> times { times.length * 60 / (times.max - times.min) }[j['data'].map { |c| Time.parse(c['created_time']) }]
# => 20.285306704707562
@dtinth
dtinth / Project.md
Created May 19, 2014 14:20
MIDI Key Mapper
@dtinth
dtinth / infinitely.js
Last active August 29, 2015 14:00
Infinitely Descending Chord
/**
* INFINITELY DESCENDING CHORD PROGRESSION (v1.1)
*
* Enjoy this chord progression that loops forever....
* By Thai Pangsakulyanont (https://github.com/dtinth)
*
* https://gist.github.com/dtinth/11371713
*/
var step = 0.1
@dtinth
dtinth / do-you-hear-the-peeople-sing.coffee
Last active August 29, 2015 14:00
Do You Hear the People Sing?
###
# DO YOU HEAR THE PEOPLE SING? (Uplifting Mix)
# version 1.3 (clearer kick sound)
#
# Converted from CoffeeScript
# Source: https://gist.github.com/11080149
# Usage: coffee -bcp file.coffee
#
# Original from Les Miserables
@dtinth
dtinth / DocGen.md
Last active August 29, 2015 13:56
Documentation Generation

Documentation Generation

How to scan directory

Dir['*.js']
#=> ["diff.js", "index.js", "patch.js", "screen-buffer.js", "test-patch.js"]
@dtinth
dtinth / SortedIndex.md
Last active January 2, 2016 12:19
Sorted Index

Sorted Index

สมมติว่าเรามีอาร์เรย์อยู่ เราสามารถแทรกข้อมูลที่ตำแหน่งใดก็ได้ใน Array โดยใช้เมธอด Array#insert แบบนี้

arr = [6, 7, 2, 3]
arr.insert(0, "first")
 #=> ["first", 6, 7, 2, 3]
arr.insert(3, "second")