xcode-select --install
xcode-select --install
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
``` | |
gem uninstall --all --ignore-dependencies --executables | |
gem install bundler | |
gem update --system | |
``` |
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
``` | |
x = a.scan(/https\:\/\/i.pinimg\.com[\/\d\w]*\.jpg\s2x/) | |
require 'open-uri' | |
def download_image(url, dest) | |
open(url) do |u| | |
File.open(dest, 'wb') { |f| f.write(u.read) } | |
end |
# postgesql
User.limit(5).order("RANDOM()")
# mysql
User.limit(5).order("RAND()")
https://hashrocket.com/blog/posts/rails-quick-tips-random-records
gem uninstall fileutils
gem update fileutils --default
params do
requires :number, type: Integer, values: ->(v) { v.even? && v < 25 }
end
params do
optional :category
given category: ->(val) { val == 'foo' } do
requires :description
end
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 update-index --assume-unchanged FILE_NAME | |
https://fallengamer.livejournal.com/93321.html | |
https://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree# | |
git assume-unchanged vs skip-worktree |
https://stackoverflow.com/questions/36190800/how-to-disable-sparse-checkout-after-enabled
Revert modified files: git checkout -f
Remove untracked files: git clean -fd
sparseCheckout
git config core.sparseCheckout true
echo -e "/*\n!node_modules" >> .git/info/sparse-checkout
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
iframe src='http://192.168.20.227:8008/' style='position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;%' |
NewerOlder