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 'aws/s3' | |
AWS_ID = 'ネームスペース' | |
AWS_KEY = 'コンソールでみられる KEY' | |
s3 = AWS::S3.new(access_key_id: AWS_ID, secret_access_key: AWS_KEY, s3_endpoint: "b.storage.sakura.ad.jp", use_ssl: false) | |
ARGV.each{|a| | |
obj = s3.buckets[AWS_ID].objects[a] | |
obj.write(file: a) | |
puts obj.public_url.to_s |
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 -*- | |
import tweepy | |
import re | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
me = 'YOUR_SCREEN_NAME' | |
class Listener(tweepy.StreamListener): | |
def on_status(self,s): |
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 -*- | |
Plugin.create :java_beam do | |
command(:java_beam, | |
name: 'Javaビーム', | |
condition: lambda{ |opt| true}, | |
visible: false, | |
role: :window) do |opt| | |
Service.primary.post(:message => 'Javaビームビビビビビビビwwwwwwwwww') | |
end | |
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
# -*- coding: utf-8 -*- | |
Plugin.create :miku_beam do | |
command(:miku_beam, | |
name: 'みくビーム', | |
condition: lambda{ |opt| true}, | |
visible: false, | |
role: :window) do |opt| | |
Service.primary.post(:message => 'みくビーム!みくみくみくみくwwwwwwww') | |
end | |
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
#!perl | |
use strict; | |
use warnings; | |
my $pattern = shift or die "usage: $0 [pattern]"; | |
while(my $line = <STDIN>){ | |
chomp $line; | |
print $line, "\n" if $line =~ /$pattern/; | |
} |
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 Import ssreflect ssrfun ssrbool eqtype ssrnat seq fintype. | |
Require Import tuple finfun finset. | |
Definition answer := 10.-tuple 'I_ 4. | |
Definition compare(a0 a1 : answer) : nat := | |
count (fun x => fst x == snd x) (zip_tuple a0 a1). | |
CoInductive chomado := | |
| decided : answer -> chomado |
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 in_place_history_keyword_completion() { | |
pos=CURSOR # 現在のカーソル位置を取得 | |
selected=$(history -10000 | cut -d' ' -f3- | tr '|' ' ' | tr ' ' '\n' | sort -u | peco) # 選択した結果 | |
BUFFER="${BUFFER[1,$pos]}${selected}${BUFFER[$pos,-1]}" | |
CURSOR=$#BUFFER # move cursor | |
zle -R -c # refresh | |
} | |
zle -N in_place_history_keyword_completion | |
bindkey '^R' in_place_history_keyword_completion |
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
#!/usr/bin/ruby | |
require 'rss' | |
require 'open-uri' | |
require 'uri' | |
# 日本人っぽいのだけ欲しい場合' | |
URL = 'http://xpathfeed.com/feed?url=http%3A%2F%2Fjp.xvideos.com%2F&xpath_list=%2F%2F*%5B%40class%3D%22thumbBlock%22%5D%2Fdiv%2Fp%5B1%5D%2Fa' | |
RSS::Parser.parse(open(URL).read).channel.items.each{|x| | |
uri = URI.parse x.link |
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/sh | |
set -e | |
git push --all | |
git push --tags |
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
javascript:(function(){ | |
var O = $('<div class="books"/>'); | |
var S; | |
var xs = $("#allHighlightedBooks").children(); | |
for ( var i = 0; i < xs.length; i++ ) { | |
var x = $(xs[i]); | |
var c = x.attr("class"); | |
if ( c.indexOf("bookMain") != -1 ) { | |
t = $('.title',x).text(); | |
a = $('.author',x).text(); |
OlderNewer