I hereby claim:
- I am xiangzhuyuan on github.
- I am xiangzhuyuan (https://keybase.io/xiangzhuyuan) on keybase.
- I have a public key ASA41VFjieEA2WWx2Dtki1d3Yow0ELUp1sZoVsbHkjplUQo
To claim this, I am signing this object:
ActionDispatch::Routing::RoutesInspector.new(Rails.application.routes.routes).format(ActionDispatch::Routing::ConsoleFormatter.new).split("\n") |
(function(){ | |
var btns = document.getElementsByTagName('button'); | |
for (var i = 0; i < btns.length; i++) { | |
if (btns[i].dataset.isSubscribed == "True") { | |
if (!!btns[i].dataset.showUnsubConfirmDialog) { | |
delete btns[i].dataset.showUnsubConfirmDialog; | |
} | |
btns[i].click(); | |
} | |
} |
require 'net/http' | |
require 'uri' | |
require 'cgi' | |
require 'byebug' | |
require 'nokogiri' | |
require 'yaml' | |
uri = URI.parse("https://blog.cbnanashi.net/2018/10/5575/comment-page-5") | |
request = Net::HTTP::Get.new(uri) | |
request["Authority"] = "blog.cbnanashi.net" |
#!/bin/bash | |
#var s ='';$("#activity-name-edit > a").each(function(){s+=$(this).attr('href').split('/')[3]; s+="\n";});console.log(s) | |
ids='3031291759 3031291483 3031291242 3031291096 3031290952 3023644256 3022933525 3017780038 3017658434 3013372497 3009179215 3007461440 3005419661 3004834235 3004833926 2994827251 2994213912 2992526210 2991711451 2989717745' | |
for id in $ids | |
do | |
echo "https://connect.garmin.com/modern/proxy/download-service/files/activity/$id" | |
curl "https://connect.garmin.com/modern/proxy/download-service/files/activity/$id" -H 'authority: connect.garmin.com' -H 'cache-control: max-age=0' -H 'upgrade-insecure-requests: 1' -H 'dnt: 1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'referer: https://connect.garmin.com/modern/activities' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: zh-CN, |
I hereby claim:
To claim this, I am signing this object:
2gif () { | |
ffmpeg -i $1 -b 2048k ~/Desktop/$(basename $1).gif | |
} |
require 'forwardable' | |
printer = String.new | |
printer.extend SingleForwardable # 委譲するオブジェクトの準備 | |
printer.def_delegator "STDOUT", "puts" # STDOUT.puts() への委譲を定義 | |
printer.puts "Howdy!" | |
#実行すると標準出力に「Howdy!」と出力されます。 |
require 'forwardable' | |
## MyQueue クラスの定義 | |
class MyQueue | |
extend Forwardable | |
def initialize | |
@q = [] # 委譲するオブジェクトの準備 | |
end |
python -m SimpleHTTPServer 8000 | |
ruby -run -e httpd . -p 8000 |
https://stackoverflow.com/questions/1634750/ruby-function-to-remove-all-white-spaces
String#strip - remove all whitespace from the start and the end.
String#lstrip - just from the start.
String#rstrip - just from the end.
String#chomp (with no arguments) - deletes line separators (\n or \r\n) from the end.