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
#!/usr/bin/env ruby | |
require 'fiddle/import' | |
require 'shellwords' | |
Libuim = `/sbin/ldconfig -p`.split(/[\r\n]/).map do |line| | |
line.strip.split(/\s+/)[0] | |
end.find do |line| | |
line =~ /\Alibuim[.]so[.][0-9]+\z/ | |
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
(require 'evil) | |
(setq elscreen-tab-display-control nil | |
elscreen-tab-display-kill-screen nil) | |
(require 'elscreen) | |
(evil-define-command evil-tab-new () | |
:repeat nil | |
(setq count (or count 1)) | |
(when (null (elscreen-get-frame-confs (selected-frame))) | |
(elscreen-start)) |
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
map J <C-d> | |
map K <C-u> | |
map j 3j | |
map k 3k | |
map d D | |
map ; : | |
iunmap <C-Enter> |
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
// Configuration | |
var WEBHOOK_URL = PropertiesService.getScriptProperties().getProperty('webhook_url'); | |
if (!WEBHOOK_URL) throw 'You should set "webhook_url" property from [File] > [Project properties] > [Script properties]'; | |
var SLACK_USERNAME = PropertiesService.getScriptProperties().getProperty('slack_username') || 'cronsheet'; | |
var SLACK_ICON_EMOJI = PropertiesService.getScriptProperties().getProperty('slack_icon_emoji') || ':clock3:'; | |
var SHEET_NAME = PropertiesService.getScriptProperties().getProperty('sheet_name'); | |
// ... END Configuration | |
var COLUMN_QUARTER = 1; | |
var COLUMN_DOW = 2; |
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/sh | |
# /usr/local/sbin/hotplug | |
# sysctl -w kernel.hotplug=/usr/local/sbin/hotplug | |
dir=/usr/local/etc/hotplug | |
for script in `ls -1 "$dir"/*`; do | |
[ -x "$script" ] && ( "$script" >/dev/null 2>&1 ) & | |
done |
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/sh | |
# /etc/libvirt/hooks/daemon | |
net="default" | |
pidfile="/var/run/libvirt/network/$net.pid" | |
dnsmasq="/usr/sbin/dnsmasq" | |
config="/var/lib/libvirt/dnsmasq/$net.conf" | |
case $2 in | |
start) |
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
;; http://shibayu36.hatenablog.com/entry/2012/12/22/135157 | |
(eval-when-compile (require 'cl)) | |
;;;###autoload | |
(defun anything-git-project-project-dir () | |
(let ((dir (shell-command-to-string "git rev-parse --show-toplevel"))) | |
(replace-regexp-in-string "[\n\r]+$" "" dir))) | |
;;;###autoload |
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
// http://blog.livedoor.jp/dankogai/archives/51859373.html | |
var x = { a: 1, b: 2, c: 3 }; | |
var y = { a: 1, b: 2, c: 3, d: 4 }; | |
var z = {a: 1, b: 2, c: 3 }; | |
var w = {a: 1, b: 2, c: 3, d: 4 }; | |
x.b = w; | |
y.b = x; | |
z.b = y; | |
w.b = x; |
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
// ==UserScript== | |
// @name hatena-bookmark-lower-thumbnail | |
// @namespace orednu.org | |
// @include http://b.hatena.ne.jp/* | |
// @version 1 | |
// ==/UserScript== | |
(function(w, d) { | |
w.addEventListener('load', function () { | |
var getElementsByTagAndClassName = function(element, tag, klass) { |