Skip to content

Instantly share code, notes, and snippets.

@forest
forest / keybindings.json
Created Aug 13, 2018
Running Elixir Tests in Visual Studio Code/ElixirLS
View keybindings.json
{
"key": "alt+t",
"command": "workbench.action.tasks.runTask",
"args": "mix test"
}
View Blockstack
Verifying my Blockstack ID is secured with the address 1QDBnDdmr45qQB1DCqm9qKriQzPvBpKSZj https://explorer.blockstack.org/address/1QDBnDdmr45qQB1DCqm9qKriQzPvBpKSZj
View actions.js
export class GameActions {
constructor() { }
makeChoice() {
var result = this.getRandomInt(1,3);
switch (result) {
case 1: // rock
return { type: 'GAME_ROCK' };
case 2: // paper
@forest
forest / app.html
Created Oct 31, 2017 — forked from freshcutdevelopment/app.html
Aurelia Gist - RequireJS, Bootstrap, Fontawesome
View app.html
<template>
<h1>${message}</h1>
</template>
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Hello world!</h1>
<script src="script.js"></script>
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@forest
forest / git-workflow.md
Created Feb 22, 2016
Git Feature Branch Workflow
View git-workflow.md

We subscribe to the Git Featrue Branch workflow, briefly described in that link.

In practice, it works as follows:

FEATURE DEVELOPMENT

Steps to Follow:

  1. Start with an updated local development branch -- by checking out the dev branch and pulling changes:
    git checkout development
    git pull origin development
View dirty_attribute.rb
diff --git i/lib/virtus/dirty_attribute.rb w/lib/virtus/dirty_attribute.rb
index 3854a36..13c20a3 100644
--- i/lib/virtus/dirty_attribute.rb
+++ w/lib/virtus/dirty_attribute.rb
@@ -16,7 +16,7 @@ module Virtus
def _create_writer_with_dirty_tracking(name)
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{name}=(new_regular_object)
- prev_object = #{name}
+ prev_object = instance_variable_get(:@#{name})
View nullify_blank.rb
module Virtus
class Attribute
# Attribute extension which nullifies blank attributes when coercion failed
#
module NullifyBlank
# @see [Attribute#coerce]
#
# @api public
@forest
forest / create_koken.sh
Last active Jan 18, 2016 — forked from bradleyboy/create_koken.sh
Docker script for Koken
View create_koken.sh
#!/bin/bash
echo ""
# Root check
if [[ "$UID" -ne 0 ]]; then
echo "!! This script requires root privileges. sudo ./create_koken.sh"
echo ""
exit
fi