Skip to content

Instantly share code, notes, and snippets.

Google's Suggested Env setup:

  1. Go to https://www.webpagetest.org/
  2. Enter web url
  3. Set location: Phoenix, AZ Chrome (will change later)
  4. Set Browser: Chrome (will change later)
  5. Click Advanced
  6. Set connection to 3G
  7. Set number of tests to 3
  8. Click Chrome Tab
@darcy
darcy / gist:eed1844df607bbdf5c1524c9f95f9a80
Created November 13, 2017 02:09
Keybase.io verification
### Keybase proof
I hereby claim:
* I am darcy on github.
* I am darcybrown (https://keybase.io/darcybrown) on keybase.
* I have a public key ASBH9cGH4u9A8v4eZXvw4DLQpMNws18ne2UaVYa7Z0CsCAo
To claim this, I am signing this object:
@darcy
darcy / Qubes3.2 On MacBook Pro.md
Last active January 12, 2019 08:47
Qubes3.2 On MacBook Pro #qubes #shared
@darcy
darcy / pi-setup.md
Last active September 24, 2017 19:20
PI Setup
@darcy
darcy / gist:2896009
Created June 8, 2012 14:51
MongoDB Trigram Search
// THIS SHOULD WORK AS COPY/PASTE into mongo console
var games = ["here is a test", "small test", "another game"];
var query = 'here is testing a test';
//////////////////////////////////////////////
// 1. util functions
var intersect = function(arr1, arr2) {
class ErrorHelper
def self.handle_exception(exception, params={})
# ActiveSupport::Deprecation.warn("ErrorHelper has been deprecated. Use Exceptional#handle, Exceptional#rescue, or Exceptional#rescue_and_reraise instead.", caller)
params = filter_params(params)
Rails.logger.error exception.message
Rails.logger.error params.to_json if params
Rails.logger.error exception.backtrace.join("\n") if exception.backtrace
class OobGCDisabled < OobGC
def gc
# do nothing
end
end
# superclasses OobGCForInterval as a backup strategy if the max begins to fail
class OobGCOnMaxMemory < OobGCForInterval
attr_accessor :max_memory, :successful
require 'sys/proctable'
module Unicorn
class OnMaxHeap < Struct.new(:max_rss, :max_vsize)
include OobGCCondition
include Sys
def initialize(max_rss = nil, max_vsize = nil)
%w( rss vsize ).each do |required_mem_field|
raise "sys/proctable doesn't support required memory fields on this platform" unless ProcTable.fields.include?(required_mem_field)