Skip to content

Instantly share code, notes, and snippets.

View joshua's full-sized avatar
🌮

Joshua Suggs joshua

🌮
View GitHub Profile
@joshua
joshua / updateModified.js
Created April 12, 2022 18:07 — forked from kodie/updateModified.js
A JavaScript function for Google Sheets that updates a specific cell with the current date/time when cell(s) are updated.
function getColumnNumberByName(name, sheet) {
if (!sheet) {
sheet = SpreadsheetApp.getActiveSheet()
}
var headers = sheet.getDataRange().offset(0, 0, 1).getValues()[0]
var column = false
for (var i = 0; i < headers.length; i++) {
if (headers[i].trim() === name) {
@joshua
joshua / images.sh
Created January 21, 2021 14:36
Save and Load All Docker Images
#!/bin/bash
case "${1}" in
"save")
# dump image tags so they can be restored later
echo "saving tags to image-tags.txt"
docker images | sed '1d' | awk '{print $1 " " $2 " " $3}' > allimages-tags.txt
# save all images to a single tar
echo "saving images to allimages.tar"
package main
import (
"bytes"
"context"
"fmt"
"log"
"net"
"net/http"
"os"
### Keybase proof
I hereby claim:
* I am joshua on github.
* I am suggs (https://keybase.io/suggs) on keybase.
* I have a public key ASBRaw3Jul98kKZo14kLu0w5XzS5lvUCUtOLI8UAQ92R6wo
To claim this, I am signing this object:
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
find_files() {
find . -not \( \
\( \
-wholename '*/vendor/*' \
@joshua
joshua / bumpme
Last active April 28, 2016 20:15
Thu Apr 28 20:15:29 UTC 2016
For PPTP:
IP Protocol=TCP, TCP Port number=1723 <- Used by PPTP control path
IP Protocol=GRE (value 47) <- Used by PPTP data path
For L2TP:
IP Protocol Type=UDP, UDP Port Number=500 <- Used by IKEv1 (IPSec control path)
IP Protocol Type=UDP, UDP Port Number=4500 <- Used by IKEv1 (IPSec control path)
IP Protocol Type=ESP (value 50) <- Used by IPSec data path
For SSTP:
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
# Default PowerShell Profile
#
# ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
#
# Remote script execution must be enabled.
# Get-ExecutionPolicy should return RemoteSigned or Unrestricted
#
# If no, run the following as Administrator:
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
#
@joshua
joshua / README.md
Created April 3, 2013 12:56
Install RVM on Mac OS X

Install Apple Developer Tools (xcode + cli)

Install Homebrew:

http://mxcl.github.com/homebrew/

Once homebrew is installed you need install gcc42:

# brew tap homebrew/dupes
# brew install apple-gcc42