Skip to content

Instantly share code, notes, and snippets.

@NapoleonWils0n
NapoleonWils0n / tr_replace_characters.sh
Created Nov 11, 2012
bash: tr replace characters
View tr_replace_characters.sh
#!/bin/sh
# ======
# = tr =
# ======
# Use the tr command to translate one character to another.
tr ';' ',' <before.txt >after.txt
View tr_convert_case.sh
#!/bin/sh
# convert case
tr 'A-Z' 'a-z' <before.txt >after.txt
@NapoleonWils0n
NapoleonWils0n / tor install from source.sh
Created Nov 11, 2012
macosx: tor install from source
View tor install from source.sh
#!/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 Nov 11, 2012
macosx: keyboard tips
View mac_tips.txt
==============
= Dictionary =
==============
select some text then press the key combination below to open the dictionary
⌘+Ctrl+D
=================
View Mac_osx_keyboard_shortcuts.txt
==============================
= 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 Nov 11, 2012
macosx: timemachine schedule
View time machine schedule.sh
#!/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 Nov 11, 2012
macosx: timemachine set up with sparse bundle
View time_machine_set_up.txt
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 Nov 11, 2012
macosx: timemachine backup dropbox to usb
View Dropbox_to_a_USB_Stick_with_Time_Machine.txt
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 Nov 11, 2012
macosx: textutil convert to another format
View textutil_convert_text_to_another_format.sh
#!/bin/sh
# ===========================================
# = textutil convert text to another format =
# ===========================================
# syntax
# textutil -convert fmt filename
View text_to_speech.sh
#!/bin/sh
say -f infile.txt -o outfile.aiff