Skip to content

Instantly share code, notes, and snippets.

View colindensem's full-sized avatar
🏠
Working from home

Fynn.Codes colindensem

🏠
Working from home
View GitHub Profile
@colindensem
colindensem / gist:fc9879b8c43282ba032b529af613f21f
Last active March 12, 2017 17:37
rSnapshot per host Config - Adaptations for centmin
#
# For each new host to back up, run these as root:
#
#
# First, specify the hostname (used in the config files).
# This hostname must actually work.
HOST="server.fqdn"
#
@colindensem
colindensem / README
Last active February 22, 2017 19:40
webpack - phoenix - umbrella
This is a config to use webpack and specficially two different areas.
There is a user area and an admin area. The JS/assets for Admin do not want to be sent to users and vice versa.
This will probably work, but no warranty offered.
@colindensem
colindensem / git-dmz-flow.md
Created January 12, 2017 21:09 — forked from djspiewak/git-dmz-flow.md
Git DMZ Flow

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea
@colindensem
colindensem / dofstrim
Created January 1, 2017 11:12
/etc/cron.weekly/dofstrim
#!/bin/sh
#
# To find which FS support trim, we check that DISC-MAX (discard max bytes)
# is great than zero. Check discard_max_bytes documentation at
# https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt
#
for fs in $(lsblk -o MOUNTPOINT,DISC-MAX,FSTYPE | grep -E '^/.* [1-9]+.* ' | awk '{print $1}'); do
fstrim "$fs"
done
@colindensem
colindensem / scheduler.ex
Created November 12, 2016 17:05 — forked from danielberkompas/scheduler.ex
A simple mix task scheduler for Elixir apps
defmodule MyApp.Scheduler do
@moduledoc """
Schedules a Mix task to be run at a given interval in milliseconds.
## Options
- `:task`: The name of the Mix task to run.
- `:args`: A list of arguments to pass to the Mix task's `run/1` function.
- `:interval`: The time interval in millisconds to rerun the task.
@colindensem
colindensem / examples.elm
Created October 10, 2016 14:59 — forked from wordyallen/examples.elm
Hello Elm
module Main exposing (..)
import Html exposing (text)
main =
text "Hello, World!"
@colindensem
colindensem / drop_many_tables.sql
Created August 18, 2016 05:24 — forked from kleinron/drop_many_tables.sql
MySQL bulk drop table where table like... See the question and the answers: http://stackoverflow.com/q/11053116/17772
SET @temp_statement = NULL;
SELECT
GROUP_CONCAT(table_schema, '.`', table_name, '`') INTO @temp_statement
FROM
(
SELECT
table_schema, table_name
FROM
information_schema.tables
WHERE
@colindensem
colindensem / introrx.md
Created June 12, 2016 19:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@colindensem
colindensem / rc.local
Created April 14, 2016 20:08
ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L6F]/ ACPI Error: [PGRT] Namespace lookup failure, AE_NOT_FOUND
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@colindensem
colindensem / elixir_phoenix_app.conf
Created May 24, 2015 11:49
Ubutnu - Upstart - Phoenix - Elixir
#!upstart
#Elixir app is deployed using capistrano v3
#Swap app_name for your application name
description "Service Up - app_name"
author "Colin Densem <[email protected]>"
start on filesystem