Skip to content

Instantly share code, notes, and snippets.

@NapoleonWils0n
NapoleonWils0n / tr_replace_characters.sh
Created November 11, 2012 19:33
bash: tr replace characters
#!/bin/sh
# ======
# = tr =
# ======
# Use the tr command to translate one character to another.
tr ';' ',' <before.txt >after.txt
@NapoleonWils0n
NapoleonWils0n / tr_convert_case.sh
Created November 11, 2012 19:33
bash: tr convert case
#!/bin/sh
# convert case
tr 'A-Z' 'a-z' <before.txt >after.txt
@NapoleonWils0n
NapoleonWils0n / tor install from source.sh
Created November 11, 2012 19:31
macosx: tor install from source
#!/bin/sh
# install tor from source for command line tools
# tor-resolve
# first download and install libevent - http://libevent.org/
cd libevent-2.0.19-stable/
./configure
@NapoleonWils0n
NapoleonWils0n / mac_tips.txt
Created November 11, 2012 19:31
macosx: keyboard tips
==============
= Dictionary =
==============
select some text then press the key combination below to open the dictionary
⌘+Ctrl+D
=================
@NapoleonWils0n
NapoleonWils0n / Mac_osx_keyboard_shortcuts.txt
Created November 11, 2012 19:30
macosx: keycboard shortcuts
==============================
= Mac osx keyboard shortcuts =
==============================
/* Paragraphs =============================================================================*/
control-A move to start of current paragraph
control-E move to end of current paragraph
@NapoleonWils0n
NapoleonWils0n / time machine schedule.sh
Created November 11, 2012 19:28
macosx: timemachine schedule
#!/bin/sh
#The last number is the time interval in seconds, making hours grouped by 3600 second segments.
#If you wanted to wait 4 hours between backups, the number would be 14400, and so on.
sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 14400
#The default setting is one hour, or 3600 seconds, which can be restored with:
# sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 3600
@NapoleonWils0n
NapoleonWils0n / time_machine_set_up.txt
Created November 11, 2012 19:28
macosx: timemachine set up with sparse bundle
time machine set up
1 - create the sparsebundle disk image with disk quitlity
2 - set the volume size to partition size of hard drive its on
3- name the sparsebundle with the ethernet id of the mac you are backing up
computername_000000000000.sparsebundle
@NapoleonWils0n
NapoleonWils0n / Dropbox_to_a_USB_Stick_with_Time_Machine.txt
Created November 11, 2012 19:27
macosx: timemachine backup dropbox to usb
Back up my Dropbox to a USB Stick with Time Machine
You exclude every folder on your Mac except the Dropbox folder from your Time Machine back up
1 - Insert USB stick into Mac ( Make sure the usb stick is bigger than the size of your Dropbox )
2 - Open Disk Utility and then select the USB in the left pane and click the erase button
@NapoleonWils0n
NapoleonWils0n / textutil_convert_text_to_another_format.sh
Created November 11, 2012 19:25
macosx: textutil convert to another format
#!/bin/sh
# ===========================================
# = textutil convert text to another format =
# ===========================================
# syntax
# textutil -convert fmt filename
@NapoleonWils0n
NapoleonWils0n / text_to_speech.sh
Created November 11, 2012 19:25
macosx: text to speech
#!/bin/sh
say -f infile.txt -o outfile.aiff