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 / README.md
Last active August 29, 2019 20:44
Rails 6 Graphql ActionCable

I can't seem to get graphql subscriptions to work with the graphql gem and ActionCable 6.

The schema is able to be introspected and the following query:

subscription buildSub($buildUuid:String!) {
  build(uuid:$buildUuid) {
    uuid
    status
    success
 lastModified
@cschiewek
cschiewek / SETUP.md
Last active May 28, 2019 15:49
Setting up your environment

There are many ways to install and configure Ruby in your development environment. If you don't have a working Ruby dev environment, this is our recommended setup for MacOS:

  • Install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install rbenv
brew install rbenv
🙈 ➜ sbn git:(yarn-install-and-check) ✗ COMPOSE_FILE=docker-compose.yml docker-compose run --rm app bash
Creating network "sbn_default" with the default driver
Creating volume "sbn_node_modules" with default driver
Creating sbn_stats_1 ... done
Creating sbn_sync_1 ... done
Creating sbn_elastic_1 ... done
Creating sbn_memcached_1 ... done
Creating sbn_redis_1 ... done
Creating sbn_mysql_1 ... done
Creating sbn_dns_1 ... done
@cschiewek
cschiewek / bloodborne.md
Last active January 22, 2018 14:45 — forked from rpt/bloodborne.md
Bloodborne Checklist

So, I can replicate this ballooning:

$ docker -v
Docker version 17.06.2-ce, build cec0b72

Here's the base image size after doing "Reset to factory defaults"

du -h /Users/curtis/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
1.3G    /Users/curtis/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
@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
@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 / x11_docker_mac.md
Last active May 24, 2024 10:48
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 / 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 / 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