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
0x0000 00000 (main.go:3) SUBQ $24, SP 0x0000 00000 (main.go:10) SUBQ $24, SP | |
0x0004 00004 (main.go:3) MOVQ BP, 16(SP) 0x0004 00004 (main.go:10) MOVQ BP, 16(SP) | |
0x0009 00009 (main.go:3) LEAQ 16(SP), BP 0x0009 00009 (main.go:10) LEAQ 16(SP), BP | |
0x000e 00014 (main.go:3) FUNCDATA $0, gclocals·1a65e721a2ccc325b382662e7ffee780(SB) 0x000e 00014 (main.go:10) FUNCDATA $0, gclocals·1a65e721a2ccc325b382662e7ffee780(SB) | |
0x000e 00014 (main.go:3) FUNCDATA $1, gclocals·69c1753bd5f81501d95132d08af04464(SB) 0x000e 00014 (main.go:10) FUNCDATA $1, gclocals·69c1753bd5f81501d95132d08af04464(SB) | |
0x000e 00014 (main.go:4) MOVQ "".s+56(SP), CX 0x000e 00014 (main.go:11) MOVQ "".s+56(SP), DX | |
0x0013 00019 (main.go:4) MOVQ "".a+48(SP), DX 0x0013 00019 (main.go:11) MOVQ "".a+32(SP), BX | |
0x0018 00024 (main.go:4) CMPQ CX, DX 0x0018 00024 (main.go:11) MOVQ "".a+40(SP), SI | |
0x001b 00027 (main.go:4) JHI 60 0x001d 00029 (main.go:11) XORL AX, AX | |
0x001d 00029 (main.go:5) MOVQ "".a+32(SP), AX 0x001f 00031 (main.go:11) NOP |
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
#!/bin/env ruby | |
require "google_drive" | |
require 'date' | |
require 'dotenv/load' | |
session = GoogleDrive::Session.from_config("config.json") | |
# Uploads a local file. | |
session.upload_from_file(ENV["FILE_PATH"], Date.today.strftime('%Y%m%d'), convert: false) |
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
require 'benchmark' | |
ary = [] | |
ary2 = [] | |
ary3 = [] | |
Benchmark.bm 10 do |r| | |
r.report "+" do | |
10000.times { |n| ary += [n] } | |
end | |
r.report "push" do |
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
def level(exp) | |
level = 1 | |
return level if exp == 0 | |
while true do | |
next_level = level + 1 | |
level_exp = (10 *(1.7 **level -1.7)/0.7).to_int | |
next_level_exp = (10 *(1.7 **next_level -1.7)/0.7).to_int | |
if level_exp < exp && exp <= next_level_exp then |
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 strict; | |
use warnings; | |
my @results; | |
sub functional_number { | |
my $num = shift; | |
if( $results[$num] ) { | |
return $results[$num]; |
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 strict; | |
use warnings; | |
use Data::Dumper; | |
my @hoge = qw/aa dd ee ff/; | |
my %hash = ( | |
test => @hoge, | |
); |
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 strict; | |
use warnings; | |
use utf8; | |
use feature "switch"; | |
# map 生成 | |
my @map; | |
my $MAP_SIZE = 35; | |
my $iter = sub { |
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 strict; | |
use warnings; | |
use utf8; | |
use Web::Query; | |
use NetAddr::IP; | |
my @ips; | |
wq(q{http://www.nttdocomo.co.jp/service/developer/smart_phone/technical_info/etc/index.html}) | |
->find('#maincol div:nth-child(4) div .delmb') | |
->each(sub{ |
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
#!/bin/bash | |
PID_FILE=/var/run/fluentd.pid | |
CONF_FILE=/etc/fluent/fluent.conf | |
LOG_FILE=/var/log/fluent/fluent.log | |
PSNAME="fluentd --daemon" | |
F_USER=fluentd | |
F_GROUP=fluentd | |
RUBY_VER="1.9.3-p194" |
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 strict; | |
use warnings; | |
use utf8; | |
package Amon2::Plugin::DBIx::Handler; | |
use DBIx::Handler; | |
sub init { | |
my ($class, $context_class, $config) = @_; |
NewerOlder