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
| You need to have Foomatic-RIP and Ghostscript installed. You can find links to installers on this page: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/pxlmono (alternatively you can install ghostscript using brew with ‘brew install ghostscript’). There is a pxlmono download on that page which contains loads of PPD files for all sorts of printers, but none of them support colour. | |
| Once the dependencies are installed, you can use pxlcolor to generate a PPD file on this page for the printer, or generate a Generic PCL 6/PCL XL Printer PPD file (attached), which allows you to print with colour. | |
| http://www.openprinting.org/driver/pxlcolor | |
| Set the printer up using Cups. To do this you need to enable the web interface by running this from a Terminal prompt: | |
| cupsctl WebInterface=yes | |
| You can then browse Cups on http://localhost:631/printers/ |
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
| find /usr/local/graphite/storage/whisper/ -name "*.wsp" | xargs -I {} whisper-info.py {} 2>&1 | grep "whisper.CorruptWhisperFile:" | sed -e "s/^.*(//" -e "s/).*$//" |
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
| Taken from http://hints.macworld.com/article.php?story=20080317085050719 | |
| Put the below line in your .profile, .bash_profile or .bashrc file (whichever you use). | |
| If you don't know which file to put it in, read this explanation: | |
| http://stackoverflow.com/questions/415403/whats-the-difference-between-bashrc-bash-profile-and-environment#answer-415444 | |
| complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh |
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
| ls /usr/local/graphite/storage/whisper/carbon/agents/*/metricsReceived.wsp | xargs -I {} whisper-dump.py {} | sed -e "s/,//" | awk '$1 ~ /^[0-9]/ && $3 > 0 {day=strftime("%Y-%m-%d", $2); if ($3 > sizes[day]) {sizes[day]=int($3)}} END {for(day in sizes) {print day " " sizes[day]}}' | sort |
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
| <NotepadPlus> | |
| <UserLang name="Excel" ext="" udlVersion="2.0"> | |
| <Settings> | |
| <Global caseIgnored="yes" allowFoldOfComments="no" forceLineCommentsAtBOL="no" foldCompact="no" /> | |
| <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
| </Settings> | |
| <KeywordLists> | |
| <Keywords name="Comments" id="0"></Keywords> | |
| <Keywords name="Numbers, additional" id="1"></Keywords> | |
| <Keywords name="Numbers, prefixes" id="2"></Keywords> |
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
| find ~/Library/Application\ Support/MobileSync/Backup/ -name ca3bc056d4da0bbf88b5fb3be254f3b7147e639c -exec sqlite3 {} "select zcontent from znotebody where zcontent like '%Music%';" \; | sed -e "s/<div>/\\ | |
| /g" -e "s/<[^>]*>//g" "-e s/ / /g" |
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
| <exec command="/bin/bash" args="-c 'commandwhichusesvars'" /> |
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/gawk -f | |
| /Cmnd_Alias/ { | |
| value = substr($0, index($0, "=")+1,length($0)) | |
| for (command in commands) gsub(command,commands[command],value) | |
| sub(/^ */,"",value) | |
| commands[$2]=value | |
| print $0 | |
| } |
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
| function safeGetDataAttribute(element, dataName){ | |
| if (element.dataset){ | |
| return element.dataset[dataName]; | |
| } | |
| return element.getAttribute('data-' + dataName); | |
| } |
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
| netstat -n -A inet | grep -v "127\.0\.0\.1" | egrep -v "\w\s*\w\s*\w\s*[0-9.]*:(80|8080)" | awk '/tcp/ {statuses[$6]++; hosts[$5]++} END{for (status in statuses) {print status,statuses[status]}; for (host in hosts) {if(hosts[host] > max_per_host_port) {max_per_host_port = hosts[host]}}; print "max_per_host",max_per_host_port}' |