Skip to content

Instantly share code, notes, and snippets.

View nielsonm's full-sized avatar

Michael Nielson nielsonm

  • Tag 1 Consulting
  • United States
  • 02:06 (UTC -07:00)
View GitHub Profile
@rjz
rjz / pdx-reactjs-lightning-talks.md
Last active February 13, 2019 23:51
Lightning talks from the @pdxreactjs meetup on 2019-02-12.

PDXReactJS Lightning Talks

Lightning talks from the @pdxreactjs meetup on 2019-02-12.


A Better Approach to React Testing

Daniel Lemay - @dslemay

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active June 25, 2026 01:33
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active October 6, 2025 20:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@crittermike
crittermike / gist:618e57a41286e555dea8
Last active November 24, 2020 21:30
A list of Whens, Thens, and Givens for Drupal Behat testing
Given /^(?:|I )am on "(?P<page>[^"]+)"$/
Given /^(?:|I )am on (?:|the )homepage$/
Given :type content:
Given :vocabulary terms:
Given I am an anonymous user
Given I am at :path
Given I am logged in as :name
Given I am logged in as a user with the :permissions permission(s)
Given I am logged in as a user with the :role role(s)
Given I am logged in as a user with the :role role(s) and I have the following fields:
{
"name": "mynamespace/myproject",
"description": "Composer file example",
"repositories": [
{
"type": "composer",
"url": "http://drupal-packagist.webflo.io/"
},
{
"type": "package",
# Delete all git branches merged into master
git-branch-cleanup() {
echo "Do you want to delete remote branches? [y/n]"
read remote
echo "Do you want to delete local branches? [y/n]"
read local
echo "Which branch do you want to have as the base? All branches merged into this branch will be deleted. Defaults to master."
read branchBase
git checkout $branchBase
IFS=$'\n'
@purplexa
purplexa / bash_prompt.sh
Last active August 29, 2015 14:05
My fancy bash prompt
function prompt_command {
local RED="\[\033[0;31m\]"
local GREEN="\[\033[0;32m\]"
local YELLOW="\[\033[0;33m\]"
local BLUE="\[\033[0;34m\]"
local MAGENTA="\[\033[0;35m\]"
local CYAN="\[\033[0;36m\]"
local CRESET="\[\033[0m\]"
if git branch >/dev/null 2>/dev/null; then
@jk
jk / README.md
Last active April 27, 2018 18:02
Behat + Mink + Selenium 2 Stack

Important files

Here you find the DSL language definition for your phrases you can use in .feature files:

  • features/bootstrap/FeatureContext.php inherits from
  • vendor/behat/mink-extension/Behat/MinkExtension/Context/MinkContext.php

Installation

With Homebrew that gets really easy:

@mnapoli
mnapoli / behat-reference.feature
Last active May 31, 2026 20:53
Behat Mink reference
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 17, 2026 19:56
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: