To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
/* This is the original elf.h file from the GNU C Library; I only removed | |
the inclusion of feature.h and added definitions of __BEGIN_DECLS and | |
__END_DECLS as documented in | |
https://cmd.inp.nsk.su/old/cmd2/manuals/gnudocs/gnudocs/libtool/libtool_36.html | |
On macOS, simply copy the file to /usr/local/include/. | |
Mathias Lafeldt <[email protected]> */ | |
/* This file defines standard ELF types, structures, and macros. |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
#!/usr/bin/python | |
'''Uses Cocoa classes via PyObjC to set a random desktop picture on all screens. | |
Tested on Mountain Lion and Mavericks. | |
See: | |
https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWorkspace_Class/Reference/Reference.html | |
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html |
#!/bin/bash | |
# | |
# crashplanFixup.sh for Macintosh OS X 10.9 (and probably earlier versions) | |
# | |
# This script will prevent CrashPlan from de-duplicating data on files greater than 1k. | |
# Based on information from http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/ | |
# | |
# NOTE: Must be run with sudo! IE: $ sudo sh ./crashplanFixup | |
# | |
# v1.1 2014-03-13 by [email protected] |
set progress description to "A simple progress indicator" | |
set progress additional description to "Preparing…" | |
set progress total steps to -1 | |
delay 5 | |
set progress total steps to 100 | |
repeat with i from 1 to 100 | |
try | |
set progress additional description to "I am on step " & i |
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr'] | |
def human_log(res): | |
if type(res) == type(dict()): | |
for field in FIELDS: | |
if field in res.keys(): | |
encoded_field = res[field].encode('utf-8') | |
print '\n{0}:\n{1}'.format(field, encoded_field) |
rm -f out | |
mkfifo out | |
trap "rm -f out" EXIT | |
while true | |
do | |
cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out". | |
export REQUEST= | |
while read line | |
do | |
line=$(echo "$line" | tr -d '[\r\n]') |
#!/bin/bash | |
# A script to set up a new mac. Uses bash, homebrew, etc. | |
# Focused for ruby/rails development. Includes many utilities and apps: | |
# - homebrew, rvm, node | |
# - quicklook plugins, terminal fonts | |
# - browsers: chrome, firefox | |
# - dev: iterm2, sublime text, postgres, chrome devtools, etc. | |
# - team: slack, dropbox, google drive, skype, etc |
#!/usr/bin/python | |
# As written, this requires the following: | |
# - OS X 10.6+ (may not work in 10.10, haven't tested) | |
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6) | |
# - pyObjC (as such, recommended to be used with native OS X python install) | |
# Only tested and confirmed to work against 10.9.5 | |
# Run with root |