Skip to content

Instantly share code, notes, and snippets.

Drew Reece drewreece

View GitHub Profile
@drewreece
drewreece / test-send.py
Last active Aug 31, 2016
Sends Pokémon stickers for testing pokealarm
View test-send.py
# -*- coding: utf-8 -*-
# drop into alarms/Telegram/ & run in that directory
import telepot
import json
import os
import sys
import time
target_chat = "TELEGRAM_CHAT-ID"
@drewreece
drewreece / get-spawns.py
Last active Aug 21, 2016
Get spawns from pogom.db & make spawns.json
View get-spawns.py
# place in PokemonGo-Map directory to use with
# https://github.com/PokemonGoMap/PokemonGo-Map
from pogom.app import Pogom
from pogom import models
import json
from pogom.models import Pokemon, init_database
import os.path
import sys
outputFile = 'spawns.json'
@drewreece
drewreece / AHT-my-disk.sh
Last active Oct 13, 2018
Install Apple Hardware Test to a volume and bless the AHT
View AHT-my-disk.sh
#!/bin/sh
#
# AHT My Disk
#
# Copy Apple Hardware Test to a volume and bless the hardware test to be bootable
#
# Useful list of AHT & models from upekkha - https://github.com/upekkha/AppleHardwareTest thx u :)
# find your model details & get the AHT disk image
## sysctl hw.model | awk '{ print $2 }'
## ioreg -l | grep board-id | awk -F\" '{ print $4 }'
@drewreece
drewreece / Backup-iOS-Apps.sh
Last active Dec 29, 2015
Find all iOS apps in a directory and remove duplicates with the same file name. Copies found apps to a destination folder. The destination will contain a date stamped folder of Apps e.g. condenses iOS apps within Time Machine backups into individual app versions and copies in one folder. NOTE: uses sudo to access the protected Time Machine data.…
View Backup-iOS-Apps.sh
#!/bin/sh
#
# Backup-iOS-Apps.sh
#
# Find all '.ipa' apps in a directory
# Takes advantage of the file name which includes the version string in iOS apps
# Remove duplicates with the same name (i.e. can parse TimeMachine disk into single app versions)
# Copies found apps to destination folder
# The destination will contain a date stamped folder of Apps
#
@drewreece
drewreece / get-logs.sh
Created Nov 23, 2013
Gather all the logs on a Mac. Gather copies in a folder next to this script… Logs/DateStamp/Hostname/
View get-logs.sh
#!/bin/sh
#
# get-logs.sh (rename to get-logs.command to make clickable version)
# Get all the logs on a Mac
#
# Requires Admin account & password.
# Results end up in directory next to the script
# Logs/Date/hostname/folders
#
echo `basename "$0"` "\nRequires Admin account & password.\t [ctrl+c to abort]"
@drewreece
drewreece / Arch-First-Update.sh
Created Jun 25, 2012
Update Arch Linux ARM on a Raspberry Pi
View Arch-First-Update.sh
#!/bin/sh
#
# Arch-First-Update.sh
# For Raspberry Pi
#
# Based on archlinuxarm-29-04-2012
# SHA-1 b84d1eaba2ec64982da40ccd7dba06b186f6954
#
# See http://www.raspberrypi.org/phpBB3/viewtopic.php?f=53&t=8512&p=107921#p107921
#
@drewreece
drewreece / flashback-test.sh
Created Apr 5, 2012
Check for flashback on Mac OSX
View flashback-test.sh
#!/bin/bash
# Flashback.k test -
# Quick check to see if the Mac has the signs that are mentined at f-secure.com
# http://www.f-secure.com/v-descs/trojan-downloader_osx_flashback_k.shtml for more info
#
# Steps From f-secure.com...
#1. Run the following command in Terminal:
#defaults read /Applications/Safari.app/Contents/Info LSEnvironment
#2. Take note of the value, DYLD_INSERT_LIBRARIES
#3. Proceed to step 8 if you got the following error message:
@drewreece
drewreece / hosts-to-vm.sh
Last active Jun 26, 2018
Import locally defined hosts into Windows VM hosts file
View hosts-to-vm.sh
#!/bin/sh
# hosts-to-vm.sh
#
# Made for use alongside the excellent ievms -
# https://github.com/xdissent/ievms
#
# Will export the local hosts (from /etc/hosts)
# to a batch script & add that batch script to a Windows VM
# The batch script will be executed to import the hosts onto the VM
# The batch file seems convoluted, until you only want to append the new hosts.
You can’t perform that action at this time.