View get amazon kindle ranking
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'nokogiri' | |
require'open-uri' | |
body = open("https://www.amazon.co.jp/gp/bestsellers/digital-text/2293143051", &:read) | |
doc = Nokogiri::HTML(body) | |
doc.xpath("//div[@class='zg_itemRow']") |
View gist:a2b7371f554557fce5907c08e6925574
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
mimetypeを取得 | |
let mimeType:String = UTTypeCopyPreferredTagWithClass(string as! CFString, kUTTagClassMIMEType)!.takeRetainedValue() as String |
View git-commit-word-extractor
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
git rev-list --format=oneline --max-count=10000 HEAD |
View heroku-log
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
heroku logs --tail -a your-app-name |
View curl-with-basic
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
curl -X PUT --user "id:pass" -d "user[current_password]=XXXXXXXX&user[password]=new_XXXXXXXX" https://XXXXXX.com |jq . |
View gist:f737c8bd60a288c897f4d7c537fcd9df
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
list = "AAAA" | |
(for x <- String.split(list,"")|>Enum.drop(-1), do: ([0,0,0] ++ Integer.digits(elem(Code.eval_string("0x"<>x),0),2))|>Enum.take(-4) )|> List.flatten()|> Enum.join() | |
View gist:a31fc38819e67c078f1f658c5f30cddb
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
defmodule Executor do | |
def exec do | |
Solver.test("44165,44516", "false") | |
Solver.test("26265,31436", "true") | |
Solver.test("46345,54215", "true") | |
Solver.test("62143,11152", "false") | |
Solver.test("4242,4314,1562", "false") | |
Solver.test("5612,3656,4523", "false") | |
Solver.test("5514,1311,5252", "false") | |
Solver.test("5262,4631,2644", "true") |
View fox.rb
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
def words | |
[ | |
'Youtuber', | |
'バーチャル', | |
'のじゃロリ', | |
'おじさん', | |
'狐娘', | |
'ケモミミ', | |
'おばさん', | |
'底辺', |
View parse_with_comments
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 'parser/current' | |
str = <<-FOO | |
def hoge | |
# this is comment | |
pp"this is test" | |
end | |
FOO | |
Parser::CurrentRuby.parse_with_comments str |
View 10k times commit in one second
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
(1...100000).to_a.each{`git commit --allow-empty -m "commit"`} |
OlderNewer