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 / Chat.md
Last active December 25, 2015 10:28
Pagist Chat

Pagist Chat

Room Name
@dtinth
dtinth / index.html
Last active December 24, 2015 04:19
<!DOCTYPE html>
<html ng-app="sort">
<body ng-controller="SortingController">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.1.0/lodash.min.js"></script>
<table border="1">
<tr ng-repeat="c in data">
<th>data[{{ $index }}]</th>
<th>{{ c }}</th>
<th><div style="width: {{ c * 30 }}px; height: 30px; background: black;"></div></th>
@dtinth
dtinth / lawn_code.rb
Created July 15, 2013 08:24
(Codejam 2013) One Statement Lawnmower in Ruby
require 'matrix' and gets.to_i.times { |i| puts "Case ##{i+1}: #{(m = Matrix[*Array.new(gets.split.map(&:to_i)[0]) { gets.split.map(&:to_i) }]).enum_for(:each_with_index).all? { |c,i,j| [m.row(i).max, m.column(j).max].min == c } ? 'YES' : 'NO'}" }
# FizzBuzz in Lambda Calculus LiveScript
#
# Based on the problem from Chapter 6 of
# Understanding Computation: From Simple Machines to Impossible Programs
# by Tom Stuart
# http://computationbook.com/
#
# Only these things are allowed:
# - Creating functions
@dtinth
dtinth / chain.js
Created June 13, 2013 14:37
Synchronous Chain Utility
function chain(obj, ctx) {
var result
if (ctx === undefined) ctx = {}
function next(fn) {
if (fn == null) return result
if (result === undefined) result = fn.call(obj, ctx)
return next
}
return next
require 'pty'
require 'io/console'
STDIN.raw do
File.open('keylog.txt', 'a') do |log|
PTY.spawn('vim wtf') do |r, w, pid|
w.winsize = STDIN.winsize
rs = { STDIN => w, r => STDOUT }
rs.compare_by_identity
loop do
@dtinth
dtinth / code.html
Last active December 18, 2015 04:49
How To Synchroscope
<!-- synchroscope stuff -->
<script src="https://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script><!-- optional -->
<script src="https://synchroscope.herokuapp.com/socket.io/socket.io.js"></script>
<script src="https://synchroscope.herokuapp.com/sync.js"></script>
<!-- end synchroscope stuff -->
@dtinth
dtinth / customcommand.vim
Last active December 18, 2015 04:39
Vim Custom Command
" put me in your vimrc
" bind run command
map <leader>r :call RunCustomCommand()<cr>
map <leader>s :call SetCustomCommand()<cr>
let g:silent_custom_command = 0
function! RunCustomCommand()
up
if g:silent_custom_command
execute 'silent !' . s:customcommand
else
// returns itself
var self = function(object) {
return object
}
var get = function(name) {
// returns a property of an object
return function(object) {
return object[name]
<!DOCTYPE html>
<html>
<body>
<iframe name="hello" id="hello" frameborder="0" style="width:0;height:0;position:absolute;left:-1000px"></iframe>
<input type="button" id="button" value="submit">
<script>
document.getElementById('button').addEventListener('click', function() {