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" |
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 |
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 |
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 |
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; |
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>') |
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 |
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/> |
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 |
NewerOlder