Skip to content

Instantly share code, notes, and snippets.

View foozmeat's full-sized avatar

James Moore foozmeat

View GitHub Profile
@foozmeat
foozmeat / create_keychain.sh
Last active June 29, 2017 20:28
Build a macos keychain from identities stored in a .p12 file
#!/bin/bash
# some keychain stuff borrowed from
# https://apple.stackexchange.com/questions/287610/keychains-created-by-an-ssh-connection-are-locked-and-can-not-be-used
# export identities with
# security export -k ${KEYCHAIN_NAME} -t identities -o identities.p12 -P ${P12_PASSWORD} -f pkcs12
YELLOW=`tput setaf 3`
RESET=`tput sgr0`
@foozmeat
foozmeat / softwareupdate.py
Last active October 5, 2016 21:04
Intelligently manage software updates on Mac OS X
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 9-9-2015 by James Moore (@foozmeat)
Install software updates automatically and intelligently.
If you improve this script please send me patches.
@foozmeat
foozmeat / squirt
Last active September 13, 2018 14:07
squirt: upload a file to a slack channel from the cli
#!/usr/bin/env ruby
require 'json'
if ARGV.length < 3 then
puts "Usage: squirt <filename> <channel> <comment>"
exit
end
token = ""
@foozmeat
foozmeat / tor_relay_on_solar_vps.md
Last active September 25, 2022 16:37
Tor Relay on Solar VPS w/ Ubuntu. Includes optional exit relay setup.

Setting up a Tor Relay on a Solar VPS (OUTDATED)

Please take extra care when following these instructions. They're outdated and may not reflect best practices any longer

This guide is being written for someone who knows their way around Linux/Unix and is comfortable with the responsibility of running their own server. Running this configuration should cost you about $5/month. If you're not comfortable setting up your own server then donating that $5 to other Tor relay operators is still helpful.

Open the following pages up for reference. Ideally you should read through them before beginning.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░████░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░█████████░░░░░░░░░░░░░░░░░░░░
░░░░░░░░███░░░░░░█░░░░░░░░░░░░░░░░░░░░
░░░░░░███░░░░░░░░██░░░░░░░░░░░░░░░░░░░
░░░░░██░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░
░░░░██░░░░░░░░░░░░░█░░░░░░░░░░░░░░░░░░
░░░░█░░░░░░░░░░█░░░█░░░░░░░░░░░░░░░░░░
░░░███░█░░░░░██░█░░█░░░░░░░░░░░░░░░░░░
░░░███░██░░█░███░░░█░░░░░░░░░░░░░░░░░░
@foozmeat
foozmeat / lynis.sh
Last active May 8, 2019 19:56
Script to run lynis and notify you if something needs attention
#!/bin/sh
#set -x
EMAIL=someone@example.com
OLDHOME=${HOME}
cd ~/lynis
. /etc/apache2/envvars
./lynis -c -Q -q --profile /etc/lynis/default.prf
@foozmeat
foozmeat / download_twitter_avatars.rb
Last active August 29, 2015 14:06
Batch downloading twitter avatars from a CSV file containing handles
#!/usr/bin/env ruby
require 'twitter'
require 'csv'
require 'fileutils'
require 'open-uri'
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
@foozmeat
foozmeat / PANWebServerConnection.h
Created September 8, 2014 22:17
GCDWebServerConnection sub-class that can emulate different transfer speeds
//
// PANWebServerConnection.h
//
// Created by James Moore on 9/8/14.
//
#import "GCDWebServerConnection.h"
@interface PANWebServerConnection : GCDWebServerConnection

Keybase proof

I hereby claim:

  • I am foozmeat on github.
  • I am james (https://keybase.io/james) on keybase.
  • I have the public key with fingerprint 2536 ED14 2693 9F75 1CBF  13D8 D565 BF51 5407 E78A

To claim this, I am signing this object:

@foozmeat
foozmeat / gist:7896392
Created December 10, 2013 19:14
a ruby function to perform some basic checks on an app package to validate it for Mac App Store submission
def mas_validation
return unless $config[:build][:package]
if $config[:build][:ios]
else
if $config[:build][:configuration] == 'ReleaseMacAppStore'
notice("Validating for MAS")
# puts "Verifying package signature"