Skip to content

Instantly share code, notes, and snippets.

Avatar

Subak Systems subak

  • Subak Systems
  • Japan
View GitHub Profile
View unison.rb
class Unison < Formula
desc "Unison file synchronizer"
homepage "https://www.cis.upenn.edu/~bcpierce/unison/"
url "https://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.48.3.tar.gz"
sha256 "f40d3cfbe82078d79328b51acab3e5179f844135260c2f4710525b9b45b15483"
bottle do
cellar :any_skip_relocation
revision 1
sha256 "bdd87bd8da922dcafb207de183d7d1c4bc5deaab21ebe5b327da0d61ad404cf1" => :el_capitan
View unison-fsmonitor
#!/usr/bin/env python3
#
# unox
#
# Author: Hannes Landeholm <hannes@jumpstarter.io>
#
# The Unison beta (2.48) comes with file system change monitoring (repeat = watch)
# through an abstract "unison-fsmonitor" adapter that integrates with each respective
# OS file update watch interface. This allows responsive dropbox like master-master sync
# of files over SSH. The Unison beta comes with an adapter for Windows and Linux but
View ocaml.rb
# OCaml does not preserve binary compatibility across compiler releases,
# so when updating it you should ensure that all dependent packages are
# also updated by incrementing their revisions.
#
# Specific packages to pay attention to include:
# - camlp4
# - opam
#
# Applications that really shouldn't break on a compiler update are:
# - mldonkey
View screen.rb
class Screen < Formula
homepage "https://www.gnu.org/software/screen"
stable do
url "http://ftpmirror.gnu.org/screen/screen-4.2.1.tar.gz"
mirror "https://ftp.gnu.org/gnu/screen/screen-4.2.1.tar.gz"
sha1 "21eadf5f1d64120649f3390346253c6bc8a5103c"
# This patch is to disable the error message
# "/var/run/utmp: No such file or directory" on launch
@subak
subak / gist:5144191
Last active Dec 14, 2015
Stateful Nite 第4夜
View gist:5144191

jQuery.Deferred#pipe

非同期処理を直列に実行するときに、直前の実行結果が次の非同期処理の初期条件になるような場合に使います。

// 2 * 5 = 10
var filter = function ( x ) {
  return x * 5;
}
var callback = function ( result ) {
View textmate.rb
require 'formula'
class Textmate < Formula
homepage 'http://macromates.com/'
head 'https://github.com/textmate/textmate.git'
url 'https://github.com/textmate/textmate', :using => :git
version '9268'
depends_on 'ninja'
depends_on 'proctools'
depends_on 'ragel'
View screen_devel.rb
require 'formula'
class ScreenDevel < Formula
url 'http://git.savannah.gnu.org/cgit/screen.git/snapshot/screen-master.tar.gz'
homepage 'http://www.gnu.org/software/screen/'
md5 'e095751919af7a5b3c26e730f05c5355'
depends_on 'autoconf'
def install
@subak
subak / one_seconds_spec.rb
Created Jun 29, 2012
OneSeconds wrapped at FiberPool with 5 fibers
View one_seconds_spec.rb
# -*- encoding: utf-8; -*-
require "eventmachine"
require "rack/fiber_pool"
require "rack/test"
require "logger"
def logger
Logger.new STDOUT do
@subak
subak / preventback.js
Created Jun 18, 2012
エントリー作成中にブラウザの「戻る」を防ぐ
View preventback.js
(function() {
$(function() {
var $action;
$action = $("[name^='ACMS_POST_Entry_Insert'], [name^='ACMS_POST_Entry_Update']");
if (0 !== $action.size()) {
window.onbeforeunload = function() {
return "エントリーを編集中にページを離れると保存できない場合があります。よろしいですか?";
};
return $($action[0].form).submit(function() {
@subak
subak / http_load.rb
Created May 23, 2012
htt_load Formula for home brew
View http_load.rb
require 'formula'
class HttpLoad < Formula
url 'http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz'
homepage 'http://www.acme.com/software/http_load/'
md5 'd1a6c2261f8828a3f319e86ff0517219'
def install
system "make"
system "make install"