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 / keybase.md
Created September 20, 2014 15:46
Keybase Verification

Keybase proof

I hereby claim:

  • I am dtinth on github.
  • I am dtinth (https://keybase.io/dtinth) on keybase.
  • I have a public key whose fingerprint is 9D6F F952 88E9 EB76 F123 910D B957 3A77 A413 0BB4

To claim this, I am signing this object:

require 'growl'
loop { Growl.notify('Press the remote control',
name: 'press_remote'); sleep 14.5 * 60 }
#! /usr/bin/python
"""
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
in http://www.tc.umn.edu/~brams006/selfsign.html.
Before using this script, you'll need to create a private
s = Time.now
wc = `pbpaste | wc -w`.to_i
print "#{wc} words"
gets
t = (Time.now - s).to_i
puts "#{t} seconds"
puts "#{wc * 60 / t} wpm"
require 'osaka'
require 'growl'
def get_player_position
Osaka::ScriptRunner.execute(%q(tell application "iTunes" to get the player position)).to_f
end
def get_track_description
Osaka::ScriptRunner.execute(%q(tell application "iTunes" to get the current track's long description))
<!DOCTYPE html><meta charset=utf-8>
<style>
body { padding: 0; margin: 0; }
#outer {
width: 1632px; height: 1224px;
color: white; background: black;
font: bold 192px/1.3 Helvetica Neue, sans-serif;
position: relative;
}
#inner {
@dtinth
dtinth / title.rb
Last active September 1, 2017 10:07
require 'base64'
require 'erb'
title, subtitle, *text, image_number = ARGV
output_file = "image%02d.cover.png" % [image_number.to_i]
html = ERB.new(File.read('title.template.html.erb')).result(binding)
data_url = "data:text/html;base64,#{Base64.strict_encode64(html)}"
RASTERIZE = "/usr/local/share/phantomjs/examples/rasterize.js"
require 'watir-webdriver'
puts "== Album Description Updater =="
description = File.read(ARGV[0])
parts = description.scan(/https:\/\/www\.facebook\.com\/.*?\/media_set\S+/)
puts "There are #{parts.length} albums whose descriptions are to be updated!"
browser = Watir::Browser.new :firefox, :profile => 'watir'
@dtinth
dtinth / config.json
Created June 5, 2014 01:35
Powerline config.json
{
"common": {
"term_truecolor": false,
"dividers": {
"left": {
"hard": " ",
"soft": " "
},
"right": {
"hard": " ",
@dtinth
dtinth / dtinth.json
Created June 5, 2014 01:34
Powerline theme for Vim
{
"segment_data": {
"branch": {
"before": " "
},
"modified_indicator": {
"args": { "text": "+" }
},
"line_percent": {
"args": { "gradient": false },