Skip to content

Instantly share code, notes, and snippets.

View thash's full-sized avatar
🌵
⭐️ ⭐️ ⭐️ ⭐️ ⭐️

Takuya Hashimoto thash

🌵
⭐️ ⭐️ ⭐️ ⭐️ ⭐️
View GitHub Profile
@thash
thash / ctmcp4.11.oz
Last active August 29, 2015 14:14 — forked from sekia/ctmcp4.11.oz
% ex. 1
local B in
thread
B=true % 1
end
thread
B=false % 2
end
if B then % 3
{Browse yes} % 4
@thash
thash / puyo.clj
Created June 21, 2013 19:40 — forked from kohyama/puyo.clj
(ns puyo
(:require [clojure.test :refer (with-test run-tests are)]
[clojure.set :refer (union)]
[clojure.string :as string]))
(with-test
(defn- fall-one [b s]
(let [h (count b)]
(->> (reverse b)
(apply map vector)
;(function ($) {
var githubCacheFilePath = [];
var githubCacheSha = [];
var fnSuccess =
function (data, startLineNum, endLineNum, callback) {
if (data.data.content && data.data.encoding === "base64") {
var contentArray =
window
.atob(data.data.content.replace(/\n/g, ""))
@thash
thash / redis-server
Created September 10, 2012 05:09 — forked from lsbardel/redis-server-for-init.d-startup
Init.d Redis script for Fedora16
#!/bin/bash
#
# Init file for Redis server
#
# chkconfig: - 98 02
# description: Persistent key-value db
#
# processname: redis
# config: /etc/redis.conf
# pidfile: /var/run/redis.pid
@thash
thash / gist:2986414
Created June 25, 2012 03:54 — forked from cbeier/gist:343311
Convert XML to Ruby Hash (using Nokogiri)
# USAGE: Hash.from_libxml(YOUR_XML_STRING)
# http://movesonrails.com/articles/2008/02/25/libxml-for-active-resource-2-0
require 'nokogiri'
# updated because original version is written in 2 years ago. - memerelics
class Hash
class << self
def from_libxml(xml)
begin
result = Nokogiri::XML(xml)
return { result.root.name.to_s.to_sym => xml_node_to_hash(result.root)}
@thash
thash / Home2Lang.scala
Created February 10, 2012 08:45 — forked from yuroyoro/Home2Lang.scala
プログラミング言語「ほむほむ」
import java.io.File
import scala.io.Source
import scala.util.matching.Regex
import scala.util.parsing.combinator._
import scala.util.parsing.input.{Position, NoPosition}
sealed abstract class Insn extends ( CED => CED ){
val pos:Position
}
case class App( m:Int, n:Int, pos:Position ) extends Insn{
@thash
thash / cap_notify.rb
Created November 1, 2011 11:53 — forked from johnthethird/cap_notify.rb
Capistrano deployment email notifier for Rails 3
=begin
Capistrano deployment email notifier for Rails 3
Do you need to send email notifications after application deployments?
Christopher Sexton developed a Simple Capistrano email notifier for rails. You can find details at http://www.codeography.com/2010/03/24/simple-capistrano-email-notifier-for-rails.html.
Here is Rails 3 port of the notifier.
The notifier sends an email after application deployment has been completed.