Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.
Calculated by memstats.rb https://gist.github.com/kenn/5105061 on Debian x86_64.
# ./memstats.rb 20547
Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.
Calculated by memstats.rb https://gist.github.com/kenn/5105061 on Debian x86_64.
# ./memstats.rb 20547
class User < ActiveRecord::Base | |
# ... lots of persistence stuff | |
end | |
class GitHubUserProvisioner < SimpleDelegator | |
def provision_with!(user_info, extra_user_hash) | |
self.github_login = extra_user_hash['login'] | |
self.name = user_info['name'] | |
self.email = user_info['email'] | |
self.github_url = user_info['urls']['GitHub'] |
def stuff | |
yield action: 'Boom', schedule: '7PM', color: :red, debug: true | |
end | |
# When a hash is yielded to a block, we can used named arguments to | |
# capture the keys we want, and an anonymous splat to ignore | |
# everything else | |
stuff { |action:, schedule:, **| p "Doing #{action} at #{schedule}" } | |
# |
Security Advisories / Bulletins linked to Log4Shell (CVE-2021-44228)
Retry count | Retry Time | Total Cumulative Time | Total Cumulative Days | |
---|---|---|---|---|
0 | 0:00:00 | 0:00:00 | 0.0 | |
1 | 0:00:16 | 0:00:16 | 0.0 | |
2 | 0:00:31 | 0:00:47 | 0.0 | |
3 | 0:01:36 | 0:02:23 | 0.0 | |
4 | 0:04:31 | 0:06:54 | 0.0 | |
5 | 0:10:40 | 0:17:34 | 0.0 | |
6 | 0:21:51 | 0:39:25 | 0.0 | |
7 | 0:40:16 | 1:19:41 | 0.1 | |
8 | 1:08:31 | 2:28:12 | 0.1 |
# prune branches deleted in origin
git remote prune origin
# prune tags
# http://stackoverflow.com/questions/1841341/remove-local-tags-that-are-no-longer-on-the-remote-repository
git fetch --prune <remote> '+refs/tags/*:refs/tags/*'
# retrieves commit relative date and message | |
humanify() { | |
while read hash; do | |
# echo to trim the new line | |
echo $( git log -n 1 ..$hash --format='%ci : %h : %s%n%b' ) | |
done | |
} | |
# show the commits! | |
git fsck --unreachable | grep -oP '(?<=commit )\w+' | humanify | sort |
Install the ActiveRecord Session Store gem and read the documentation for how to use it and create your sessions
table.
Create a migration to add user_id
to the sessions
table.
class AddUserIdToSessions < ActiveRecord::Migration
disable_ddl_transaction!
# Flags Ruby | |
# Sentinel to check that the rbenv-vars plugin is in use. | |
RBENV_VARS_ENABLED=1 | |
# Ruby 2.1 GC reading: | |
# http://tmm1.net/ruby21-rgengc/ | |
# http://thorstenball.com/blog/2014/03/12/watching-understanding-ruby-2.1-garbage-collector/ | |
# http://samsaffron.com/archive/2013/11/22/demystifying-the-ruby-gc |