Skip to content

Instantly share code, notes, and snippets.

View jfernandez's full-sized avatar
🦀
Rust and eBPF

Jose Fernandez jfernandez

🦀
Rust and eBPF
View GitHub Profile
for file in `find /var/www/vhosts/santosdumont.com/web_users/ -type f`; do
set filename = basename $file
echo '$filename'
done
class ActiveRecord::Base
named_scope :conditions, lambda { |*args| {:conditions => args} }
end
named_scope :for, lambda { |reason|
(reason ? { :conditions => { :payment_reasons => { :reason_type => (reason.is_a?(Array) ? reason.first.class.name : reason.class.name), :reason_id => reason }}, :include => [:payment_reasons] } : {}) }
pasadmin@domU-12-31-39-0A-99-11 ~ $ free -m
total used free shared buffers cached
Mem: 7680 3972 3707 0 258 1810
-/+ buffers/cache: 1903 5777
Swap: 30725 0 30725
run "cd #{release_path} && gem bundle"
unless (memcached_config = MemcachedConfig.new).disabled?
memcached_options = memcached_config.options
config.cache_store = :mem_cache_store, memcached_options.delete(:servers), memcached_options
end
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
# Rails cache_store
Rails.cache.instance_variable_get(:@data).reset if Rails.cache.class == ActiveSupport::Cache::MemCacheStore
# Reset the session_store, value could be nil depending on how you set it up
ActionController::Base.session_options[:cache].reset
# Reset the cache_fu connection (if used)
{% if current_page == "rakeback/full-tilt.html" %}
HTML for Full Tilt goes here!
{% elsif current_page == "rakeback/party-poker.html" %}
HTML for Party Poker goes here!
{% else %}
ENV['APP_ROOT'] ||= File.dirname(__FILE__)
$:.unshift "#{ENV['APP_ROOT']}/vendor/plugins/newrelic_rpm/lib"
require 'newrelic_rpm'
require 'new_relic/agent/instrumentation/rack'
module Toto
class Server
include NewRelic::Agent::Instrumentation::Rack
end
end
[Thu, 29 Apr 2010 13:08:25 -0700] INFO: Ran execute[reporting for ssh keys] successfully
[Thu, 29 Apr 2010 13:08:25 -0700] INFO: Setting mode to 755 for directory[/home/pasadmin/.ssh]
[Thu, 29 Apr 2010 13:08:26 -0700] ERROR: ruby_block[copy-ssh-keys-for-pasadmin] (/etc/chef/recipes/cookbooks/ssh_keys/recipes/default.rb line 32) had an error:
no address for
/usr/local/ey_resin/ruby/lib/ruby/1.8/resolv.rb:233:in `getaddress'/usr/local/ey_resin/ruby/lib/ruby/1.8/resolv.rb:204:in `getaddress'/etc/chef/recipes/cookbooks/ey-base/libraries/cluster_info.rb:9:in `private_ip_for'/etc/chef/recipes/cookbooks/ey-base/libraries/cluster_info.rb:14:in `cluster'/etc/chef/recipes/cookbooks/ey-base/libraries/cluster_info.rb:13:in `map'/etc/chef/recipes/cookbooks/ey-base/libraries/cluster_info.rb:13:in `cluster'/etc/chef/recipes/cookbooks/ssh_keys/recipes/default.rb:36:in `from_file'/etc/chef/recipes/cookbooks/ey-base/libraries/ruby_block.rb:33:in `call'/etc/chef/recipes/cookbooks/ey-base/libraries/ruby_block.rb:33:in `action_c