brew cask install visual-studio-code
Code > Preferences > Settings
{
from hashlib import sha256 | |
MAX_NONCE = 10000000 | |
def create_sha256(text): | |
return sha256(text.encode("ascii")).hexdigest() | |
def mining(block_number, transactions, prev_hash, difficulty): |
def remote_file_exits?(url, limit=10) | |
raise ArgumentError, 'too many HTTP redirects' if limit == 0 | |
uri = URI(url) | |
response = Net::HTTP.get_response(uri) | |
case response | |
when Net::HTTPNotFound then | |
false |
AllCops: | |
Include: | |
- '**/*.rb' | |
- '**/*.rake' | |
- '**/Gemfile' | |
Exclude: | |
- '**/tmp/**/*' | |
- '**/vendor/**/*' | |
- '**/node_modules/**/*' |
open https://static01.nyt.com/images/$(date +"%Y/%m/%d")/nytfrontpage/scan.pdf |
#!/usr/bin/env ruby | |
MAX_RETRY = 3 | |
PATH = "/sys/bus/iio/devices/" | |
TEMP_SENSOR = PATH + "iio\:device#{ARGV[0].to_i}/in_temp_input" | |
HUMIDITY_SENSOR = PATH + "iio\:device#{ARGV[0].to_i}/in_humidityrelative_input" | |
def save_read(sensor) | |
run = 1 | |
while run < MAX_RETRY |
nmap -sP 192.168.1.*
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
# | |
# If you find yourself ignoring temporary files generated by your text editor | |
# or operating system, you probably want to add a global ignore instead: | |
# git config --global core.excludesfile '~/.gitignore_global' | |
# Ignore bundler config. | |
/.bundle | |
# Ignore all logfiles and tempfiles! |