This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TARGET="/Volumes/Macintosh HD" # Specify where to configure Recovery partition | |
| MACOS_INSTALLER="/Applications/Install\ macOS\ Sierra.app" # Path to your macOS installer | |
| # Remaining paths ahead are dependant on OS version | |
| # This *should* support 10.9 and above but is only tested on 10.12 | |
| curl http://support.apple.com/downloads/DL1464/en_US/RecoveryHDUpdate.dmg -L -o ~/Downloads/RecoveryHDUpdate.dmg | |
| hdiutil mount ~/Downloads/RecoveryHDUpdate.dmg | |
| pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/recoveryupdate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| VERSION=4.0.1 | |
| SCRIPT=`basename "$0"` | |
| APPNAME="My App" | |
| APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns" | |
| OSX_VERSION=`sw_vers -productVersion` | |
| PWD=`pwd` | |
| function usage { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Calculates network and broadcast based on supplied ip address and netmask | |
| # Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0 | |
| # Usage: broadcast_calc.sh 192.168.0.1/24 | |
| tonum() { | |
| if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "twitter" | |
| require "json" | |
| require "faraday" | |
| # things you must configure | |
| TWITTER_USER = "your_username" | |
| # get these from dev.twitter.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ################################ | |
| # OS X Install ISO Creater # | |
| # # | |
| # Author: shela # | |
| ################################ | |
| ####################################### | |
| # Declarations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import csv | |
| import time | |
| import re | |
| import codecs, cStringIO | |
| from argparse import ArgumentParser | |
| import tweepy | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### To run this script you must install Windows Management Framework 5.0 before https://www.microsoft.com/en-us/download/details.aspx?id=50395 | |
| ### Be careful to get the right installation package for your server, 2012R2 isn't 2012 | |
| ### Run | |
| $clearFiles = $false | |
| $dryRun = $false | |
| ### School settings | |
| $asmLogin = "1234@sftp.apple.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
| # also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Go to https://twitter.com/i/likes | |
| // 2. Keep scrolling to the bottom repeatedly until all your favs are loaded. | |
| // 3. Run this in your console (open in chrome by View > Developer > JavaScript Console) | |
| // Notes: this may take a while if you have a lot of favs/likes | |
| // you can only access your most recent ~2000 likes. | |
| // inspired by https://gist.github.com/JamieMason/7580315 | |
| $('.ProfileTweet-actionButtonUndo').click() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyStreamListener(tweepy.StreamListener): | |
| def __init__(self, api=None): | |
| super(MyStreamListener, self).__init__() | |
| self.num_tweets = 0 | |
| self.file = open("tweets.txt", "w") | |
| def on_status(self, status): | |
| tweet = status._json | |
| self.file.write( json.dumps(tweet) + '\n' ) | |
| self.num_tweets += 1 |