Skip to content

Instantly share code, notes, and snippets.

James Moore foozmeat

Block or report user

Report or block foozmeat

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
@foozmeat
foozmeat / openssl-build.sh
Last active Sep 19, 2019
A shell script to build openssl for iOS and Mac. It currently builds: Mac -> i386 & x86_64 // iOS -> armv7, arm64 // iOS Simulator -> i386 & x86_64.
View openssl-build.sh
#!/bin/bash
# This script builds the iOS and Mac openSSL libraries
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script
# Credits:
# https://github.com/st3fan/ios-openssl
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh
@foozmeat
foozmeat / lynis.sh
Last active May 8, 2019
Script to run lynis and notify you if something needs attention
View lynis.sh
#!/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 / squirt
Last active Sep 13, 2018
squirt: upload a file to a slack channel from the cli
View squirt
#!/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 Aug 2, 2018
Tor Relay on Solar VPS w/ Ubuntu. Includes optional exit relay setup.
View tor_relay_on_solar_vps.md

Setting up a Tor Relay on a Solar VPS

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 / create_keychain.sh
Last active Jun 29, 2017
Build a macos keychain from identities stored in a .p12 file
View create_keychain.sh
#!/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 Oct 5, 2016
Intelligently manage software updates on Mac OS X
View softwareupdate.py
#!/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 / gist:7896392
Created Dec 10, 2013
a ruby function to perform some basic checks on an app package to validate it for Mac App Store submission
View gist:7896392
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"
@foozmeat
foozmeat / timed_capture.sh
Last active Dec 11, 2015
A bash script to take screenshot every 60 seconds and then add a timestamp to it. Useful for creating time-lapse videos.
View timed_capture.sh
#!/bin/sh
# Help from http://dptnt.com/2009/08/add-date-time-stamp-to-jpeg-photos-using-free-software-mac-linux-nix-edition/
# install the LCD font - http://www.dafont.com/digital-7.font
# install imagemagick via homebrew
# Install Time Lapse Assembler to make the movie - http://www.dayofthenewdan.com/projects/time-lapse-assembler-1/
set -e
font="$HOME/Library/Fonts/digital-7 (mono).ttf"
outputfolder="$HOME/Downloads/caps"
View gist:34b5d5d579258c51d855
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░████░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░█████████░░░░░░░░░░░░░░░░░░░░
░░░░░░░░███░░░░░░█░░░░░░░░░░░░░░░░░░░░
░░░░░░███░░░░░░░░██░░░░░░░░░░░░░░░░░░░
░░░░░██░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░
░░░░██░░░░░░░░░░░░░█░░░░░░░░░░░░░░░░░░
░░░░█░░░░░░░░░░█░░░█░░░░░░░░░░░░░░░░░░
░░░███░█░░░░░██░█░░█░░░░░░░░░░░░░░░░░░
░░░███░██░░█░███░░░█░░░░░░░░░░░░░░░░░░
@foozmeat
foozmeat / download_twitter_avatars.rb
Last active Aug 29, 2015
Batch downloading twitter avatars from a CSV file containing handles
View download_twitter_avatars.rb
#!/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"
You can’t perform that action at this time.