Skip to content

Instantly share code, notes, and snippets.

Nick Woodhams NickWoodhams

Block or report user

Report or block NickWoodhams

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NickWoodhams
NickWoodhams / ssssl.sh
Last active Jun 25, 2019
Generates commands to create a self signed ssl that actually works. No browser errors as of 06-25-2019!
View ssssl.sh
#!/bin/bash
# Generates a self signed ssl that actually works
DOMAIN1=$1
DOMAIN2=$4
IP_ADDRESS=$2
SSL_PATH=$3
CNF_PATH="$SSL_PATH/$DOMAIN1.cnf"
KEY_PATH="$SSL_PATH/$DOMAIN1.key"
CRT_PATH="$SSL_PATH/$DOMAIN1.crt"
@NickWoodhams
NickWoodhams / import_xml_override.gs
Created Jul 3, 2018
Override Google Limit on IMPORTXML Function in Google Sheets
View import_xml_override.gs
function importRegex(url, regexInput) {
var output = '';
var fetchedUrl = UrlFetchApp.fetch(url, {muteHttpExceptions: true});
if (fetchedUrl) {
var html = fetchedUrl.getContentText();
if (html.length && regexInput.length) {
output = html.match(new RegExp(regexInput, 'i'))[1];
}
}
// Grace period to not overload
@NickWoodhams
NickWoodhams / push-clipboard-to-iphone.sh
Created Mar 7, 2018
Push Clipboard to Phone (Pushover App)
View push-clipboard-to-iphone.sh
#!/bin/bash
clipboard="message="
clipboard+=$(pbpaste)
curl -s \
--form-string "token=" \
--form-string "user=" \
--form-string "$clipboard" \
https://api.pushover.net/1/messages.json
View phila.txt
http://property.phila.gov/?p=341148200
http://property.phila.gov/?p=592073500
http://property.phila.gov/?p=422023800
http://property.phila.gov/?p=112136000
http://property.phila.gov/?p=452311500
http://property.phila.gov/?p=111083800
http://property.phila.gov/?p=364423400
http://property.phila.gov/?p=202215038
http://property.phila.gov/?p=11378300
http://property.phila.gov/?p=871265700
@NickWoodhams
NickWoodhams / random_matrix.py
Last active Feb 1, 2017
Generate a tuple with two random ints between 0 and 1000
View random_matrix.py
#! /usr/bin/python
# required library to create a matrix
import numpy
# random int library
from random import randint
from pprint import pprint
@NickWoodhams
NickWoodhams / script.m
Created Jan 23, 2017
Generate scatterplot with 2 different colors
View script.m
data =xlsread('data.xlsx');
vec1 = data (:,1);
vec2 = data (:,2);
mean_vec1 = mean(vec1)
hold on
find(vec1);
find(vec2);
hold on;
@NickWoodhams
NickWoodhams / helpers.py
Created Jan 12, 2017
Swap line break characters for div elements you can style. Useful for Displaying Textarea input values.
View helpers.py
def nl2lb(value):
return value.replace('\n', '<div class="line-break"></div>')
# Or even simpler
def nl2br(value):
return value.replace('\n', '<br>')
@NickWoodhams
NickWoodhams / create_clover_efi_single_drive.sh
Created Dec 28, 2016
Copy Clover installation from /EFI to UEFI partition on target drive. Change disk0 with with your target drive. Find disk number with "diskutil list" command.
View create_clover_efi_single_drive.sh
#!/bin/sh
sudo newfs_msdos -v EFI -F 32 /dev/rdisk0s1
sudo mkdir /Volumes/EFI
sudo mount -t msdos /dev/disk0s1 /Volumes/EFI
sudo rm -rf /Volumes/EFI/EFI
sudo cp -R /EFI /Volumes/EFI
sudo diskutil unmount /Volumes/EFI
@NickWoodhams
NickWoodhams / config.plist
Created Nov 27, 2016
My working X99 Clover config.plist
View config.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>DSDT</key>
<dict>
<key>Debug</key>
<false/>
@NickWoodhams
NickWoodhams / remove_prefs.sh
Created Nov 14, 2016
Remove Microsoft Office 2016 Preferences
View remove_prefs.sh
cd ~/Library/Containers
rm -rf com.microsoft.Excel com.microsoft.Office365ServiceV2 com.microsoft.Outlook com.microsoft.Powerpoint com.microsoft.Word com.microsoft.netlib.shipassertprocess com.microsoft.onenote.mac
rm -rf UBF8T346G9.ms UBF8T346G9.Office UBF8T346G9.OfficeOsfWebHost
You can’t perform that action at this time.