This file contains hidden or 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
#include <fstream> | |
#include <iterator> | |
std::vector<char> read(const std::string& name) { | |
std::ifstream ifs(name, std::ios::in | std::ios::binary); | |
if (ifs.fail()) throw std::runtime_error("file not found"); | |
typedef std::istreambuf_iterator<char> itr; | |
return std::vector<char>(itr(ifs), itr()); | |
} |
This file contains hidden or 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
require 'formula' | |
class Gitbucket < Formula | |
homepage 'https://github.com/takezoe/gitbucket' | |
url 'https://github.com/takezoe/gitbucket/releases/download/2.1/gitbucket.war' | |
sha256 '48ad9f399c6a8dabf38647e12f43139b33e8ede7136edc7f06270dc0beafe9f1' | |
head do | |
url 'https://github.com/takezoe/gitbucket.git' | |
depends_on :ant => :build |
This file contains hidden or 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
require 'formula' | |
class H2 < Formula | |
homepage 'http://www.h2database.com/' | |
url 'http://www.h2database.com/h2-2014-04-05.zip' | |
version '1.3.176' | |
sha1 '9a87bf67741e1b9f9711db160e783898f4242bfe' | |
devel do | |
url 'http://www.h2database.com/h2-2014-04-12.zip' |
This file contains hidden or 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
require "formula" | |
class Eb < Formula | |
homepage "http://www.sra.co.jp/people/m-kasahr/eb/" | |
url "ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2" | |
sha1 "1cc55c90fcac224bf299289e7a0fe1559f0761ab" | |
def install | |
system "./configure", "--disable-debug", | |
"--disable-dependency-tracking", |
This file contains hidden or 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
require 'formula' | |
class Dgate < Formula | |
homepage 'https://deploygate.com/docs/cli' | |
url 'https://deploygate.com/client/dgate.tar.gz' | |
sha1 '23e3723bf01f6fbca0a097fc895ca9812a8c9de3' | |
version '0.0.1' | |
patch :DATA |
This file contains hidden or 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
source "https://rubygems.org" | |
gem "mongo" | |
gem "bson_ext" |
This file contains hidden or 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
// TOTP.scala | |
// Copyright (c) 2013 TAKUMA Kei<[email protected]> | |
// This software is released under the MIT License. | |
// http://opensource.org/licenses/MIT | |
package com.takumakei.totp | |
import scala.annotation.tailrec | |
object Base32 { |
This file contains hidden or 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 | |
function find-mount-point { | |
mount | grep $1 | awk '{print $3}' | |
} | |
function check-mount { | |
a=$(find-mount-point $1) | |
if [ "$a" = "" ]; then | |
b=/Volumes/$(basename $1) |
This file contains hidden or 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 | |
function input-text { | |
script=' | |
set answer to "" | |
try | |
tell application "SystemUIServer" | |
set result to display dialog "question" default answer "" with title "title" buttons {"cancel", "ok"} default button 2 | |
if (get button returned of result) is equal to "ok" then | |
set answer to (get text returned of result) |
This file contains hidden or 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 | |
function get-property { | |
sips -g "$1" "$2" | tail -1 | awk '{ print $2 }' | |
} | |
function col-80 { | |
ruby -e " | |
b = [] | |
while a = gets |