Skip to content

Instantly share code, notes, and snippets.

View thoughtchad's full-sized avatar

Chad Lancour thoughtchad

View GitHub Profile
@scottsb
scottsb / casesafe.sh
Last active January 16, 2024 08:47 — forked from Hais/workspace.sh
Create and manage a case-sensitive disk-image on macOS (OS X).
#!/bin/bash
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}"
VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}"
VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}"
VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}"
@artturik
artturik / gist:a15d890dcfedfe8af813
Last active August 14, 2022 13:38
Convert PhantomJs cookies to NetScape HTTP cookie file format
// Convert PhantomJs cookies to NetScape HTTP cookie file format
// NOTE: It dose not create NetScape HTTP cookie file, this function return only cookie file contents
// NOTE: PhantomJs do not store "host only" cookie param, all cookies will have "host only" param set to false (line 15)
// I use this function to export PhantomJs cookies to CURL cookiejar file
// This is modified version of EditThisCookie cookie_helpers.js cookiesToString function
// USAGE: phantomJsCookiesToNetScapeString(phantom.cookies);
var phantomJsCookiesToNetScapeString = function(cookies) {
var string = "";
string += "# Netscape HTTP Cookie File\n";
@kmayer
kmayer / sidekiq.rb
Created September 8, 2013 17:41
Sidekiq Exception tracer for NewRelic Add this to your sidekiq initializer
module NewRelic
class SidekiqException
def call(worker, msg, queue)
begin
yield
rescue => exception
NewRelic::Agent.notice_error(exception, :custom_params => msg)
raise exception
end
end