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
package main | |
import ( | |
"fmt" | |
) | |
func bar() string { | |
return "hoge" | |
} |
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
eval(%w(puts ([[[[1,1+1,(1+1+1),2*2*2/1+1, | |
2*(1+1)],[1,1 +1,(1+1+1),2*2*2/1+1,3+2], | |
[1,1+1,1+1+1,2 *3+1,1],[[1,1+1,2*2,1+1, | |
2*2*2]]].map{|a rr|arr.join.to_i}.map{ | |
|e|e.chr('UTF-8') }*""],[[[2*2*2*2 | |
*2*2*2+2,3*3*2*2* 2*2+2*2*2*2* | |
2+3*2+1],[2*2*2*2 *2*2*2+2 | |
,3*3*2*2*2*2+2* 2*2*2*2],[2*2*2* | |
2*(1+1)*2*2+2 -1,2*2*2 *2*2*3-(2 | |
*2+1)]].fla tten .pack( |
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
eval(%w(puts ([[[[1,1+1,(1+1+1),2*2*2/1+1, | |
2*(1+1)],[1,1 +1,(1+1+1),2*2*2/1+1,3+2], | |
[1,1+1,1+1+1,2 *3+1,1],[[1,1+1,2*2,1+1, | |
2*2*2]]].map{|a rr|arr.join.to_i}.map{ | |
|e|e.chr('UTF-8') }*""],[[[2*2*2*2 | |
*2*2*2+2,3*3*2*2* 2*2+2*2*2*2* | |
2+3*2+1],[2*2*2*2 *2*2*2+2 | |
,3*3*2*2*2*2+2* 2*2*2*2],[2*2*2* | |
2*2*2*2+2-1,2 *2*2*2 *2*3-(2*2+1) | |
],[2*2*2*2* 2*2*2 +1,2*2*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
# command | |
# pi, gpio, wiringPi mapping confirm | |
# $ gpio readall | |
# use wiringPi pin number | |
# $ gpio mode [pin no] out | |
# $ gpio write [pin no] 1 | |
# $ gpio write [pin no] 0 |
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 'capybara/poltergeist' | |
require 'nokogiri' | |
require 'time' | |
require 'pry' | |
class YourNameFinder | |
class Base | |
attr_accessor :date, :time, :session | |
def initialize(date, time) | |
@date = date |
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 './oauth_cli' | |
require 'redis' | |
oauth_cli = OauthCli.new( | |
consumer_key: 'consumer_key', | |
consumer_secret: 'consumer_secret', | |
oauth_token: 'oauth_token', | |
oauth_token_secret: 'oauth_token_secret', | |
host: 'http://f.hatena.ne.jp', | |
) |
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
# OAuth client side | |
# move on CUI | |
# oauth 1.0 Client | |
# | |
# 1: get request token | |
# return request token and request token secret | |
# | |
# 2: input verifier | |
# |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<input type="button" id="decr" name="name" value="-"> | |
<span id="num"></span> | |
<input type="button" id="incr" name="name" value="+"> |
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
(function( $ ){ | |
$.fn.incr = function() { | |
return this.html(parseInt(this.html()) + 1); | |
}; | |
$.fn.decr = function() { | |
return this.html(parseInt(this.html()) - 1); | |
}; | |
})( jQuery ); |
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
var https = require("https"); | |
exports.handler = function(event, context) { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
// テキストが送られた時 | |
var msg = event.entry[0].messaging[0].message.text; | |
console.log(msg); | |
// 画像が送られた時 | |
// console.log(event.entry[0].messaging[0].message.attachments[0].payload.url); | |
NewerOlder