Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
)
func bar() string {
return "hoge"
}
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(
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*
# 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
require 'capybara/poltergeist'
require 'nokogiri'
require 'time'
require 'pry'
class YourNameFinder
class Base
attr_accessor :date, :time, :session
def initialize(date, time)
@date = date
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',
)
# OAuth client side
# move on CUI
# oauth 1.0 Client
#
# 1: get request token
# return request token and request token secret
#
# 2: input verifier
#
<!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="+">
(function( $ ){
$.fn.incr = function() {
return this.html(parseInt(this.html()) + 1);
};
$.fn.decr = function() {
return this.html(parseInt(this.html()) - 1);
};
})( jQuery );
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);