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'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']") |
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
| mimetypeを取得 | |
| let mimeType:String = UTTypeCopyPreferredTagWithClass(string as! CFString, kUTTagClassMIMEType)!.takeRetainedValue() as String |
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
| git rev-list --format=oneline --max-count=10000 HEAD |
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
| heroku logs --tail -a your-app-name |
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
| curl -X PUT --user "id:pass" -d "user[current_password]=XXXXXXXX&user[password]=new_XXXXXXXX" https://XXXXXX.com |jq . |
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
| 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() | |
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
| 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") |
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 words | |
| [ | |
| 'Youtuber', | |
| 'バーチャル', | |
| 'のじゃロリ', | |
| 'おじさん', | |
| '狐娘', | |
| 'ケモミミ', | |
| 'おばさん', | |
| '底辺', |
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 'parser/current' | |
| str = <<-FOO | |
| def hoge | |
| # this is comment | |
| pp"this is test" | |
| end | |
| FOO | |
| Parser::CurrentRuby.parse_with_comments str |
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
| (1...100000).to_a.each{`git commit --allow-empty -m "commit"`} |
OlderNewer