Skip to content

Instantly share code, notes, and snippets.

@bryanbraun
bryanbraun / git-branching-diagram.md
Last active Sep 15, 2021
Example Git Branching Diagram
View git-branching-diagram.md

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@bryanbraun
bryanbraun / reset_hook_post_update_NAME.drush
Created Jun 19, 2017
A drush script for reseting post_update hooks. For more details, see https://drupal.stackexchange.com/q/238682/11788
View reset_hook_post_update_NAME.drush
#!../vendor/bin/drush
// <?php
// ^^^ For syntax highlighters only
//
// This is a drush shell script, designed to help debug and reset post_update
// hooks. For details, see: http://www.drush.org/en/master/shellscripts/
$key_value = \Drupal::keyValue('post_update');
$update_list = $key_value->get('existing_updates');
@bryanbraun
bryanbraun / .gitlab-ci.yml
Created Jul 6, 2017
Example Gitlab CI Config for a Rails + Nginx application using Docker Compose
View .gitlab-ci.yml
# See how variables work, and a list of predefined ones:
# - https://docs.gitlab.com/ce/ci/variables/
variables:
RAILS_IMAGE: registry.gitlab.com/bryanbraun/gridmaster.io/railsapp:$CI_COMMIT_SHA
NGINX_IMAGE: registry.gitlab.com/bryanbraun/gridmaster.io/nginx:$CI_COMMIT_SHA
DEPLOY_TAG: $CI_COMMIT_SHA
cache:
paths:
- vendor/ruby
@bryanbraun
bryanbraun / store.js
Last active Sep 1, 2019
Alt React - Core files
View store.js
export class Store {
constructor(initialState) {
this.events = {};
this.state = initialState || {};
}
/**
* setState works like a simplified version of lodash's _.set(),
* only it sets this.state instead of an arbitrary object.
*
@bryanbraun
bryanbraun / index.js
Last active May 23, 2019
Tic Tac Term
View index.js
// Tic Tac Term!
//
// A 2-player Tic Tac Toe game, played in the terminal
// (written in JavaScript 💪)
// Set up user prompt interface.
const rl = require("readline").createInterface({
input: process.stdin,
output: process.stdout
@bryanbraun
bryanbraun / .travis.yml
Last active Mar 26, 2018
Minimal NPM setup for automated testing of your client-side JS library.
View .travis.yml
language: node_js
node_js:
- "node"
branches:
only:
- master
@bryanbraun
bryanbraun / Octokit_Sinatra_Example.rb
Last active Dec 21, 2017
This file is an example Sinatra app.rb file, showing github API Authentication and usage examples of Octokit.rb. For more context on setting up Sinatra to work with the Github API, see http://developer.github.com/guides/basics-of-authentication/.
View Octokit_Sinatra_Example.rb
# app.rb
require "sinatra"
require "sinatra/activerecord"
require 'rest-client'
require 'json'
require 'octokit'
require 'pp' # for pretty print debugging
# Needed for preserving github auth tokens across sessions.
@bryanbraun
bryanbraun / README.md
Last active Aug 9, 2017
Dayton Clean Coders - August 2017
View README.md
@bryanbraun
bryanbraun / github-searches.md
Last active Aug 22, 2016
Useful Github Search Queries
View github-searches.md

Useful Github Search Queries

General

All Github projects, sorted by # of stars:
https://github.com/search?q=stars:>1&s=stars&type=Repositories

For Organizations

@bryanbraun
bryanbraun / testing.txt
Last active Jul 5, 2016
Explaining the Testing Ecosystem
View testing.txt
+==============================================================================+
| Test Env. | Driver | Test Runner | Test Framework | Syntax | Assertions |
+==============================================================================+
| Phantom | Poltergeist | Capybara | Ruby
+------------------------------------------------------------------------------+
| Chrome | Karma | Jasmine | JS
+------------------------------------------------------------------------------+
| Slimer | CasperJS | JS
+------------------------------------------------------------------------------+