This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ex. 1 | |
local B in | |
thread | |
B=true % 1 | |
end | |
thread | |
B=false % 2 | |
end | |
if B then % 3 | |
{Browse yes} % 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(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, "")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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. |