Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / macOS-in-virtualbox.md
Created March 19, 2018 02:01 — forked from rob-smallshire/macOS-in-virtualbox.md
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

@mcandre
mcandre / disable.sh
Created August 30, 2017 01:53
Disable bunch of #$!@ in Sierra (Version 2.1)
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi
@mcandre
mcandre / uninstall-razer-synapse.sh
Created August 30, 2017 01:06 — forked from timotgl/uninstall-razer-synapse.sh
How to fully uninstall Razer Synapse on OS X El Capitan without using Razer's official uninstall tool
# How to uninstall Razer Synapse ( http://www.razerzone.com/synapse/ )
# on OS X El Capitan without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
launchctl remove com.razerzone.rzdeviceengine
sudo rm /Library/LaunchAgents/com.razer.rzupdater.plist
sudo rm /Library/LaunchAgents/com.razerzone.rzdeviceengine.plist
# Tell system when Xcode utilities live:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Set "opendiff" as the default mergetool globally:
git config --global merge.tool opendiff
@mcandre
mcandre / .Xresources
Last active August 29, 2015 14:13 — forked from vreon/.Xresources
! Molokai theme
*xterm*background: #101010
*xterm*foreground: #d0d0d0
*xterm*cursorColor: #d0d0d0
*xterm*color0: #101010
*xterm*color1: #960050
*xterm*color2: #66aa11
*xterm*color3: #c47f2c
*xterm*color4: #30309b
*xterm*color5: #7e40a5
@mcandre
mcandre / stuns
Last active August 29, 2015 14:12 — forked from zziuni/stuns
# Stun servers
#
# Source: http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
#
# Example:
#
# $ brew install stuntman
# $ stunclient stun.ekiga.net
# Binding test: success
# Local address: 192.168.1.13:58717
#!/bin/bash
if [ "" = "$2" ]
then
dA=`wget -O- "http://backend.deviantart.com/rss.xml?q=gallery%3A$1+sort%3Atime&type=deviation"`
else
dA=`wget -O- "$2"`
fi
echo $dA | xmlstarlet sel -T -t -v //media:content/@url | xargs wget
#!/bin/bash
if [ "" = "$2" ]
then
dA=`wget -O- "http://backend.deviantart.com/rss.xml?q=gallery%3A$1+sort%3Atime&type=deviation"`
else
dA=`wget -O- "$2"`
fi
echo $dA | xmlstarlet sel -T -t -v //media:content/@url | xargs wget
@mcandre
mcandre / gist:6645844
Created September 21, 2013 00:51 — forked from pyrtsa/gist:6213784

When installing Haskell Platform fails on Mac OS X (with quick fix below)

I was fighting with Haskell last weekend. At first, I couldn't install some missing libraries with Cabal, and then, when trying to find out what's wrong, I ended up removing the whole Haskell installation — only to find out I could no longer install neither the Haskell Platform nor even just Cabal Install! The warnings I would see were more or less about the use of the single quote in source code:

Preprocessing library text-0.11.2.3...

Data/Text.hs:6:52:
     warning: missing terminating ' character [-Winvalid-pp-token]

-- Copyright : (c) 2009, 2010, 2011, 2012 Bryan O'Sullivan,

# sample data:
#
# row_num,gene_id,ensembl_gene_symbol,gene_symbol,entrez_id
# 1,66982,"ENSG00000000003","TSPAN6",7105
# 2,66983,"ENSG00000000005","TNMD",64102
# 3,66984,"ENSG00000000419","DPM1",8813
# 4,66985,"ENSG00000000457","SCYL3",57147
# ...
#!/usr/bin/perl