Skip to content

Instantly share code, notes, and snippets.

Sam SamSaffron

Block or report user

Report or block SamSaffron

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gel_error.txt
sam@slaptop discourse % gel exec rails c
Traceback (most recent call last):
12: from bin/rails:16:in `<main>'
11: from bin/rails:16:in `require_relative'
10: from /home/sam/Source/discourse/config/boot.rb:17:in `<top (required)>'
9: from /home/sam/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/gel-0.3.0/lib/gel/compatibility/rubygems.rb:197:in `require'
8: from /home/sam/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/gel-0.3.0/lib/gel/compatibility/rubygems.rb:197:in `require'
7: from /home/sam/.local/gel/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap.rb:3:in `<top (required)>'
6: from /home/sam/.local/gel/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap.rb:3:in `require_relative'
5: from /home/sam/.local/gel/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache.rb:71:in `<top (required)>'
View method_leak.rb
# frozen_string_literal: true
require 'securerandom'
require 'objspace'
module Giant
end
def rss
`ps -p #{Process.pid} -o rss -h`.strip.to_i
View method_leak.rb
# frozen_string_literal: true
require 'securerandom'
require 'objspace'
module Giant
end
def rss
`ps -p #{Process.pid} -o rss -h`.strip.to_i
View groups.rb
staff = %w{
JeffA
Robin
Sam
Neil
Regis
Arpit
Falco
Blake
Joffrey
View i3-plus
#!/usr/bin/env ruby
require 'i3ipc'
class I3Helper
def initialize
@i3 = I3Ipc::Connection.new
end
def tree
View i3-plus
#!/usr/bin/env ruby
require 'i3ipc'
class I3Helper
def initialize
@i3 = I3Ipc::Connection.new
end
def tree
View i3-plus
#!/usr/bin/env ruby
require 'i3ipc'
class I3Helper
def initialize
@i3 = I3Ipc::Connection.new
end
View i3-plus
#!/usr/bin/env ruby
require 'i3ipc'
class I3Helper
def initialize
@i3 = I3Ipc::Connection.new
end
View smartmove
#!/usr/bin/env ruby
# replacement for i3 move left / right command, behavior changes depending on if your window in floated or not
require 'i3ipc'
class Mover
def initialize
@i3 = I3Ipc::Connection.new
end
View test.rb
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'pg'
gem 'activerecord', '5.2.0'
gem 'benchmark-ips'
end
require 'active_record'
You can’t perform that action at this time.