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
require 'formula' | |
class Emacs < Formula | |
homepage 'http://www.gnu.org/software/emacs/' | |
url 'http://ftpmirror.gnu.org/emacs/emacs-23.4.tar.bz2' | |
mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.4.tar.bz2' | |
md5 '070c68ad8e3c31fb3cb2414feaf5e6f0' | |
fails_with_llvm "Duplicate symbol errors while linking.", :build => 2334 |
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
*** /Users/izawa/Desktop/filladapt.el 2012-06-07 17:08:35.000000000 +0900 | |
--- /Users/izawa/.emacs.d/filladapt/filladapt.el 2012-06-08 19:37:01.000000000 +0900 | |
*************** | |
*** 796,807 **** | |
(space-list '(?\ ?\t)) | |
(space ?\ ) | |
(lim (length string))) | |
! (setq string (copy-sequence string)) | |
(while (< i lim) | |
(if (not (memq (aref string i) space-list)) |
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
require 'formula' | |
class Kpcal < Formula | |
url 'http://www.tamaru.kuee.kyoto-u.ac.jp/~tsuchiya/misc/kpcal/kpcal-2.0-20040518.tar.gz' | |
md5 'fe8f98207c91745d3b824296dcab3fec' | |
def install | |
system "make" | |
bin.install 'kpcal' | |
end |
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
#! env ruby | |
require 'net/https' | |
require 'optparse' | |
Server="www.example.com" | |
Port=443 | |
CAfile="/usr/local/share/ca-bundle.crt" | |
def usage | |
puts("Usage: checkauth.rb -i <datafile>") |
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
;; t.co -> regular url replacer | |
(defun untco () | |
(interactive) | |
(let ((tco (buffer-substring (region-beginning) (region-end)))) | |
(setq resolv (replace-regexp-in-string "\n+$" "" (shell-command-to-string (format "curl -s -I %s |awk \'$1~/[lL]ocation/{print $2}\'" tco)))) | |
(if (> (length resolv) 0) | |
(progn | |
(kill-region (region-beginning) (region-end)) | |
(insert resolv))))) |
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
% git clone https://github.com/keiko713/rails-todo.git | |
% cd rails-todo | |
% bundle install --without production | |
% foreman run bundle exec rake db:migrate | |
% foreman start | |
localhost:5000 で確認する。 |
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
require 'i2c' | |
class LCD | |
def initialize(addr, path) | |
@addr = addr | |
begin | |
@dev = I2C.create(path) | |
rescue => e | |
puts e.to_s | |
exit 1 |
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
# coding: utf-8 | |
require 'rmagick' | |
require 'optparse' | |
require 'pi_piper' | |
include PiPiper | |
class Gpio | |
DELAY = 0.04 |
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
from datetime import datetime | |
from datetime import timedelta | |
import iterm2_tools | |
import urllib.request | |
import io | |
from PIL import Image | |
################### | |
## http utility function |
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
// 利用者の環境によって変更すること | |
#define SSID_NAME "YOUR_SSID" | |
#define SSID_PASSWORD "YOUR_PASSWORD" | |
#define SLACK_HOOK_URL "/services/XXXXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX" | |
// slackの仕様変更の際に要変更 | |
#define SLACK_HOST "hooks.slack.com" | |
const char* ca = "-----BEGIN CERTIFICATE-----\n" \ |