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
#!/usr/bin/env ruby | |
require 'json' | |
def parse(uri) | |
JSON.parse `curl #{uri}`.gsub("/*\n * This file is intended for use only on aws.amazon.com. We do not guarantee its availability or accuracy.\n *\n * Copyright 2014 Amazon.com, Inc. or its affiliates. All rights reserved.\n */\ncallback({",'{').gsub("\);", '').gsub(/([a-zA-Z]+):/, '"\1":') | |
end | |
table = { | |
:light => parse('http://a0.awsstatic.com/pricing/1/ec2/previous-generation/light_linux.min.js'), |
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
use Plack::Builder; | |
my $app = sub { | |
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ]; | |
}; | |
builder { | |
enable "ServerStatus::Lite", path => '/server-status', allow => ['127.0.0.1'], scoreboard => '/dev/shm/server-status', counter_file => '/tmp/counter_file'; | |
$app; | |
}; |
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
# Ikachan Dockerfile | |
FROM tatsuru/debian | |
RUN apt-get update | |
RUN apt-get install -y build-essential curl libssl-dev | |
RUN curl -s https://raw.githubusercontent.com/tagomoris/xbuild/master/perl-install > /tmp/perl-install | |
RUN bash /tmp/perl-install 5.18.2 /opt/perl-5.18 |
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
%type 通知の種類 | |
%sname 相手の名前 | |
%fname ファイル名 | |
%fpath ファイルのパス? | |
%smessage メッセージ | |
%fsize ファイルサイズ | |
%sskype ? | |
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
set -g status-right "#W [#(cat /sys/class/power_supply/BAT0/status | cut -c-1)#(cat /sys/class/power_supply/BAT0/capacity)][#(cat /sys/class/power_supply/BAT1/status | cut -c-1)#(cat /sys/class/power_supply/BAT1/capacity)] %Y/%m/%d %H:%M" |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func sqrt_newton(x float64) float64 { | |
z, prev := 1.0, 3.0 | |
const threshold = 1e-15 |
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
var c = function(){ $('div#bigCookie').click(); }; | |
setInterval(c, 1); | |
var g = function(){$('div#goldenCookie').click();}; | |
setInterval(g, 5000); | |
var u0 = function(){$('div#upgrade0').click();}; | |
setInterval(u0, 1000); | |
var calculator = function() { |
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 <stdio.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
int main(int argc, char **argv) { | |
chdir(argv[1]); | |
pid_t pid = getpid(); | |
printf("%d\n", (int)pid); | |
fflush(stdout); | |
sleep(60); |
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
files = `git diff --name-only \`git describe --abbrev=0 --tags 'HEAD'\` \`git describe --abbrev=0 --tags 'HEAD^'\` #{local_cookbook_path}`.chomp.split("\n") | |
updated_cookbooks = files.map { |f| f.sub(/^cookbooks\/([^\/]+)\/.*$/, '\1')}.uniq |
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
MYSQL_NO_DASH_VERSION = 5.6.7 |