Skip to content

Instantly share code, notes, and snippets.

Working from home on open source

Daniel P. Clark danielpclark

Working from home on open source
View GitHub Profile
View Transfer files with RSync and SSH from remote server to local

All of the following commands are to be run on the remote machine where the files to copy are

We need a key to connect with SSH

ssh-keygen -t rsa -b 4096

Put that pub key in the destination machine's ~/.ssh/authorized_keys

(asuming destination SSH is up and configured for accepting keys)

cat ~/.ssh/


Merging a PR in to develop

Using a branch named EXAMPLE_BRANCH:

git checkout develop
git fetch --all
git rebase origin/develop
git checkout EXAMPLE_BRANCH
git rebase develop
View Webpacker config Rails 6 VueJS vue-loader

At the moment upgrading vue-loader causes some changes in how things are done. These are my config options for these items just to get it working.


const { environment } = require('@rails/webpacker')
const coffee = require('./loaders/coffee')
const vue = require('./loaders/vue')

environment.loaders.append('vue', vue)
View Favorite Ruby

Favorite Ruby Gems

Gem Description
annotate_models writes the model schema to the model tests and app model files as comments.
arbre an Object Oriented DOM Tree in Ruby
arel a relational algebra
benchmark-ips provides iteration per second benchmarking for Ruby
byebug Rails' default debug tool of choice
churn the history of churns to give the number of times a file, class, or method is changing during the life of a project
coveralls online service for code coverage
View dind
The following configuration doesn't work.
docker run -d --name gitlab-dind --privileged --restart always --network gitlab-runner-net -v /var/lib/docker -v /etc/gitlab-runner:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock docker:18.06.1-ce-dind --storage-driver=overlay2
docker run -d --name gitlab-runner --restart always --network gitlab-runner-net -v /etc/gitlab-runner:/etc/gitlab-runner -e DOCKER_HOST=tcp://gitlab-dind:2375 gitlab/gitlab-runner:alpine
docker run -it --rm -v /etc/gitlab-runner:/etc/gitlab-runner gitlab/gitlab-runner:alpine register --executor docker --docker-image docker:18.06.1-ce --docker-volumes /var/run/docker.sock:/var/run/docker.sock
View gotham.deps
apt-get update
apt-get install ruby nodejs curl build-essential ruby-dev libxml2-dev
curl -sS | apt-key add -
echo "deb stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update && apt-get install yarn
curl -sSf | sh
source $HOME/.cargo/env
export USER=root
gem install bundler rake webpacker_cli
# After 1 Day


Tell Garbage Collector which objects you use. Ruby takes care of object lifecycle; C doesn't. If you still need objects, mark them in use.

void mark(void* p) {
 auto* hash = reinterpret_cast(p);
danielpclark /
Created May 11, 2018 15:52
Started writing AES file parser. Doing a rewrite with `nom` so this is for reference.
extern crate byteorder;
use byteorder::{BigEndian,ByteOrder};
use std::io::prelude::*;
use std::fs::File;
use std::str;
// 3 Octets - 'AES'
// 1 Octet - 0x02 (Version)
// 1 Octet - Reserved (set to 0x00)
// .... Start of repeating extension block section
View flicker.html
.ebb-bottom {
background-image: url(;
background-size: 400px 400px;
.images > div {
float: left;
width: 400px;