Skip to content

Instantly share code, notes, and snippets.

View cschiewek's full-sized avatar
⚙️

Curtis Schiewek cschiewek

⚙️
  • Frame.io @ Adobe
  • Sudbury, ON, Canada
  • X @cschiewek
View GitHub Profile
@cschiewek
cschiewek / gist:2828493
Created May 29, 2012 13:52 — forked from kaznum/gist:2435951
ruby-debug with ruby-1.9.3-p194 for servers
# Install with:
# bash < <(curl -L https://raw.github.com/gist/2435951)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p194 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@cschiewek
cschiewek / gist:5406033
Last active December 16, 2015 08:29
Send a handled error to newrelic in ruby
begin
raise 'example'
rescue Exception => exception
::NewRelic::Agent.notice_error(exception) if defined?(::NewRelic)
end
#app/inputs/collection_check_boxes_input.rb
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput
def item_wrapper_class
"checkbox-inline"
end
end

Keybase proof

I hereby claim:

  • I am cschiewek on github.
  • I am cschiewek (https://keybase.io/cschiewek) on keybase.
  • I have a public key whose fingerprint is AD1C F15E F339 C41A 81CF A4CE F108 2AB5 4C6A 7E52

To claim this, I am signing this object:

list = for item <- items do
{item.id, item.name}
end
@cschiewek
cschiewek / deploy.sh
Created February 23, 2016 19:02
semaphore ci deploy script
# Grab exrm release directory from cache
if [ -e $SEMAPHORE_CACHE_DIR/rel ]; then mv $SEMAPHORE_CACHE_DIR/rel . ; fi
nvm use 5.3
mix local.hex --force
MIX_ENV=prod mix deps.get --only prod
MIX_ENV=prod mix mandrag.deploy
# Cache updated release directory
mv rel $SEMAPHORE_CACHE_DIR
@cschiewek
cschiewek / curtis.zsh-theme
Created June 21, 2016 23:32
My zsh theme
local ret_status="🙈 %(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@cschiewek
cschiewek / x11_docker_mac.md
Last active June 21, 2024 09:14
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@cschiewek
cschiewek / open_locally.js
Created August 18, 2017 15:51
Bookmarklet to open current page in local chorus env
javascript: (function () {
if (window.location.protocol == "https:") {
var port = "3443"
} else {
var port = "3000"
}
var host = window.location.hostname.replace("www.", "").replace(".", "--") + ".local.sbndev.net:" + port;
window.location.href = window.location.toString().replace(window.location.hostname, host);;
}());
@cschiewek
cschiewek / update-asdf-rubygems.sh
Created August 30, 2017 13:14 — forked from gshutler/update-rbenv-rubygems.sh
Update Rubygems for all rbenv rubies
#! /usr/bin/env bash
set -e
for version in `asdf list ruby`; do
asdf local ruby "$version"
echo "Updating rubygems for $version"
gem update --system --no-document --quiet
echo ""
done