I hereby claim:
- I am czj on github.
- I am czj (https://keybase.io/czj) on keybase.
- I have a public key ASA-7J6_QjVmXe6nnNopADEypiIhM1vH2gbdW1hnns-hzAo
To claim this, I am signing this object:
before = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
50_000.times { tag.span("hey") } | |
after = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
Rails.logger.debug %(tag.span("hey") } #{after - before}s) | |
before = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
50_000.times { tag.span { "hey" } } | |
after = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
Rails.logger.debug %(tag.span { "hey" } } #{after - before}s) |
# This script comes from Pry Everywhere by Luca Pette | |
# http://lucapette.com/pry/pry-everywhere/ | |
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953 | |
if defined?(::Bundler) | |
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first | |
if global_gemset | |
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*") | |
all_global_gem_paths.each do |p| | |
gem_path = "#{p}/lib" |
require "benchmark/ips" | |
HASH = ("a".."zz").to_a.shuffle.to_h { |e| [e, "#{e}#{e}#{e}"] } | |
KEY = "zz" | |
def key_fast | |
HASH.key? KEY | |
end | |
def key_slow |
# Rewrite all commits without a certain directory | |
java -jar ~/Downloads/bfg-1.13.0.jar --delete-folders "vcr_cassettes" | |
# Remove garbage | |
git reflog expire --expire=now --all && git gc --prune=now --aggressive | |
# Push to your repo | |
git remote add origin git@github.com:my-org/my-repo.git | |
git push -u origin master |
#!/usr/bin/env bash | |
APP_HOME=$( cd ${0%/*} && pwd -P )"/.." | |
REMOTE_SHARED="railsapp@host.domain.net:~/www/railsapp/shared" | |
SPEED_LIMIT="" | |
# Un-comment this line if you want to limit the download speed to un-clog your connexion | |
# SPEED_LIMIT="--bwlimit=500" | |
# -l forces copy of symlinks | |
# |
# Ruby CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
# | |
version: 2.1 | |
executors: | |
my-executor: | |
docker: | |
# Main image to be used within this configuration |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# Download a file from a given url | |
if [ -z "$1" ]; then | |
echo "Download a video." | |
echo "Usage: ydl \"url\"" | |
else | |
youtube-dl --get-filename -o '%(title)s.%(ext)s' --restrict-filenames --yes-playlist --no-mark-watched --all-formats -f 'best[ext=mp4]/best' "$1" | |
fi |
#!/usr/bin/env ruby | |
require "bundler/inline" | |
gemfile { gem "slack-notifier" } | |
require "slack-notifier" | |
Slack::Notifier.new("https://hooks.slack.com/services/xxxxxxx").ping("• _#{query}_") | |
logs_dir = "~/Documents/work_logs" | |
query = ARGV[0].to_s.delete('\\') |
#!/usr/bin/env ruby | |
require "json" | |
1000.times do | |
json = `curl --silent --insecure "https://api.namefake.com/french-france/random/"` | |
data = JSON.parse(json) | |
puts data["name"] | |
end |