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 Insert space before backquote | |
// @namespace net.sheile.dev.slack-backquote | |
// @include https://*.slack.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
$('#message-input').bind('keydown', function(e) { | |
if(e.keyCode == 13 && !e.shiftKey) { |
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
{ | |
"variables": { | |
}, | |
"builders": [ | |
{ | |
"name": "aws-CentOS-6.5", | |
"type": "amazon-ebs", | |
"access_key": "*******************", | |
"secret_key": "**************************************", | |
"region": "us-east-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
2015/07/21 14:26:58 [INFO] Packer version: 0.8.2 28c80a648c7e35c320530561a00c889837bd6b22 | |
2015/07/21 14:26:58 Packer Target OS/Arch: linux amd64 | |
2015/07/21 14:26:58 Built with Go Version: go1.4.2 | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: amazon-chroot = /tmp/packer/packer-builder-amazon-chroot | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: amazon-ebs = /tmp/packer/packer-builder-amazon-ebs | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: amazon-instance = /tmp/packer/packer-builder-amazon-instance | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: digitalocean = /tmp/packer/packer-builder-digitalocean | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: docker = /tmp/packer/packer-builder-docker | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: file = /tmp/packer/packer-builder-file | |
2015/07/21 14:26:58 [DEBUG] Discovered plugin: googlecompute = /tmp/packer/packer-builder-googlecompute |
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/env ruby | |
WORDS = %w(ボ ン ジョ ヴィ) | |
buffer = [] | |
buffer << WORDS.sample + WORDS.sample while buffer.last(3).join != 'ジョンボンジョヴィ' | |
puts buffer.join '・' | |
puts <<-EOS |
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
def hoge arg | |
puts "hoge--- #{arg}" | |
end | |
[1, 2].each do |hoge| | |
hoge hoge | |
end | |
=begin | |
hoge---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
require 'digest/md5' | |
hash = "4b364677946ccf79f841114e73ccaf4f" | |
salt = "hoge$" | |
0.upto(999999) { |num| | |
pass = num.to_s | |
# pass = "0" * (6 - pass.size) + pass | |
pass = ("00000" + pass).slice(-6, 6) | |
md5 = Digest::MD5.hexdigest(salt + pass) | |
if hash == md5 |
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 AWS title changer | |
// @description Change page title on AWS Management Console | |
// @namespace dev.sheile.net | |
// @include https://console.aws.amazon.com/* | |
// @version 1 | |
// ==/UserScript== | |
(function() { | |
var SERVICE_NAMES = { | |
"ec2": "EC2", |
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 EntryDiff | |
// @namespace http://d.hatena.ne.jp/sheile/ | |
// @description 前回閲覧時からの差分に着色を行います | |
// @include http://*?entry_id=* | |
// ==/UserScript== | |
var entryId = location.href.match(/entry_id=([0-9]+)/)[1]; | |
var prevVisit = parseInt(GM_getValue(entryId)) || new Date().getTime() - 365 * 24 * 3600 * 1000; | |
var targets = new Array(); |