Skip to content

Instantly share code, notes, and snippets.

@RunnerRick
RunnerRick / Microsoft.PowerShell_profile.ps1
Last active August 29, 2015 14:00
PowerShell Profile
function prompt
{
# $user = (get-item env:USERNAME).Value
# $host = (get-item env:COMPUTERNAME).Value
$directoryName = (get-location).Path.Substring((get-location).Path.LastIndexOf("\") + 1)
"$directoryName>"
}
@RunnerRick
RunnerRick / 4px-Red-Border-Challenge.markdown
Created February 27, 2014 01:05
A Pen by Anthony Ticknor.

4px Red Border Challenge

Challenge

Add a 4px red border to the left side of list items... This border should be applied in the following repetitive pattern

no border border border

@RunnerRick
RunnerRick / ._window-focus-blur.md
Last active November 27, 2023 11:27
Demonstrates how to handle the window's `focus` and `blur` events.

Demonstrates how to handle the window's focus and blur events.

This code does not depend on any third-party libraries like jQuery.

@RunnerRick
RunnerRick / ._window-focus-blur-with-jquery.md
Last active March 20, 2021 04:15
Demonstrates how to handle the window's `focus` and `blur` events with jQuery.

Demonstrates how to handle the window's focus and blur events with jQuery.

@RunnerRick
RunnerRick / captureHttp.sh
Last active June 14, 2017 05:54
Using TCPDUMP to monitor incoming HTTP traffic (poor man's Wireshark).
#!/usr/bin/env bash
echo $1 | grep -E -q "^[0-9]+$" || (echo "Please specify a port number to listen to." ; exit 1)
PORT=$1
TCPDUMPARG="tcp port $PORT and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)"
sudo tcpdump -s 0 -A -i lo0 $TCPDUMPARG
@RunnerRick
RunnerRick / .git2svn.md
Last active December 21, 2015 01:18
A simple utility for using Git locally while using an external SVN repository.

A simple utility for using Git locally while using an external SVN repository.

@RunnerRick
RunnerRick / .sails-ember-bootstrap.md
Last active May 8, 2016 17:24
How To Integrate Sails, Ember, and Twitter Bootstrap
@RunnerRick
RunnerRick / .sails-and-passport.md
Last active December 3, 2023 05:01 — forked from theangryangel/AuthController.js
How To Integrate Sails and Passport