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/bash | |
# ---------------------- | |
# KUDU Deployment Script | |
# Version: 1.0.6 | |
# ---------------------- | |
# Helpers | |
# ------- |
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
DEVICE_NAME = ENV["DEVICE_NAME"] | |
SHARED_ACCESS_KEY = ENV["SHARED_ACCESS_KEY"] | |
HOST_NAME = ENV["HOST_NAME"] | |
REQUEST_PATH = "devices/#{DEVICE_NAME}/messages/events?api-version=2015-08-15-preview" | |
uri_with_port = "https://#{HOST_NAME}:443/#{REQUEST_PATH}" | |
expiry = Time.now.to_i + 60 * 60 | |
s = "#{HOST_NAME}/devices/#{DEVICE_NAME}" | |
raw = Digest::HMAC.digest("#{s}\n#{expiry}", |
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 'openssl' | |
require 'cgi' | |
require 'base64' | |
require 'time' | |
# CONNECTION_STRINGはiothub-explorerで生成した値 | |
CONNECTION_STRING = ENV['CONNECTION_STRING'] | |
CONNECTION_STRING.split(";").each do |elm| | |
key = elm[0, elm.index("=")].gsub(/([A-Z])/, "_\\1").gsub(/^_/, '').downcase | |
self.instance_variable_set("@#{key}".to_sym, elm[(elm.index('=') + 1), elm.length]) |
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
filename = ARGV[0] | |
lines = File.readlines(filename) | |
fix_footnote = lines.map { |line| | |
line.sub(/<div =class'footnotes'><ol>/, ''). | |
gsub(/<a href=.+?>←<\/a><\/p><\/li>/, "\n"). | |
sub(/<\/ol><\/div>/, ''). | |
gsub(/<li id='fn(.+?)'><p>/) { '[^' + $1 + ']: '}. | |
gsub(/<sup id='fnref(.+?)'>.+<\/sup>/) { '[^' + $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
'/Applications/Postgres.app/Contents/Versions/9.3/bin'/psql -p5432 | |
Last login: Thu Nov 3 02:00:37 on ttys000 | |
[~]$ '/Applications/Postgres.app/Contents/Versions/9.3/bin'/psql -p5432 | |
psql (9.3.5) | |
Type "help" for help. | |
miyohide=# create role hoge with createdb login password 'password'; | |
CREATE ROLE | |
miyohide=# |
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 | |
// http://nabetani.sakura.ne.jp/yokohamarb/2016.07.ront/ | |
Tiles = [ | |
{top: :left, left: :top, right: :down, down: :right}, | |
{top: :right, left: :down, right: :top, down: :left}, | |
{top: :down, left: :right, right: :left, down: :top}, | |
{top: :death, left: :death, right: :death, down: :death} | |
] | |
def input2tiles(input) |
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 'openssl' | |
require 'cgi' | |
require 'base64' | |
require 'time' | |
require 'net/https' | |
require 'json' | |
CONNECTION_STRING = ENV['CONNECTION_STRING'] | |
CONNECTION_STRING.split(";").each do |elm| |
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
(1..53).each do |i| | |
issue = "%04d" % i | |
Dir.glob("#{issue}*.md").each { |filename| | |
File.rename(filename.to_s, "markdowns/#{issue}/#{filename.to_s}") | |
} | |
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
[~/work/windowlicker]$ svn export http://windowlicker.googlecode.com/svn/trunk | |
A trunk | |
A trunk/LICENSE.txt | |
A trunk/tools | |
A trunk/tools/tools.iml | |
A trunk/tools/apache-ant-1.7.0 | |
A trunk/tools/apache-ant-1.7.0/WHATSNEW | |
A trunk/tools/apache-ant-1.7.0/LICENSE.dom | |
A trunk/tools/apache-ant-1.7.0/NOTICE | |
A trunk/tools/apache-ant-1.7.0/LICENSE |
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
<!DOCTYPE HTML> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Dynatree Sample</title> | |
<link rel="stylesheet" href="./src/skin/ui.dynatree.css" /> | |
<script type="text/javascript" src="./jquery/jquery.js"></script> | |
<script type="text/javascript" src="./jquery/jquery-ui.custom.js"></script> | |
<script type="text/javascript" src="./jquery/jquery.cookie.js"></script> | |
<script type="text/javascript" src="./dist/jquery.dynatree.min.js"></script> |