find . -name <filename> -exec grep -Hn <occurrence> '{}' \;
This file contains 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
-- Register with Growl | |
tell application "GrowlHelperApp" | |
-- The notification types | |
set the allNotificationsList to {"Current Song"} | |
set the enabledNotificationList to allNotificationsList | |
-- Register script with growl | |
register as application ¬ | |
"iTunes Current Song AppleScript" all notifications allNotificationsList ¬ | |
default notifications enabledNotificationList ¬ |
This file contains 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
/** Called when the activity is first created. */ | |
private List<Overlay> mapOverlays; | |
private Projection projection; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); |
This file contains 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
# In your .bash_profile or .profile add | |
# Github gitignore | |
function gitignore() { | |
curl -H "Accept:application/vnd.github.v3.raw+json" "https://api.github.com/gitignore/templates/$@" | |
} | |
# Example usage: | |
# $ git init | |
# $ gitignore > .gitignore |
This file contains 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
App(39964,0xb04fc000) malloc: *** error for object 0x55b09700: pointer being freed was not allocated | |
#0 0x932b9815 in malloc_error_break () | |
#1 0x932bad51 in free () | |
#2 0x0040f7c7 in _mosquitto_free at /Users/oskar/acme/app/Vendor/MqttKit/Vendor/libmosquitto/memory_mosq.c:73 | |
#3 0x00412d72 in _mosquitto_packet_write at /Users/oskar/acme/app/Vendor/MqttKit/Vendor/libmosquitto/net_mosq.c:702 | |
#4 0x00412b4e in _mosquitto_packet_queue at /Users/oskar/acme/app/Vendor/MqttKit/Vendor/libmosquitto/net_mosq.c:157 | |
#5 0x004166ea in _mosquitto_send_real_publish at /Users/oskar/acme/app/Vendor/MqttKit/Vendor/libmosquitto/send_mosq.c:280 | |
#6 0x0041645c in _mosquitto_send_publish at /Users/oskar/acme/app/Vendor/MqttKit/Vendor/libmosquitto/send_mosq.c:175 |
This file contains 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
tell application "System Events" | |
tell current location of network preferences | |
set VPNservice to service "VPN Service Name goes here" | |
if exists VPNservice then | |
set isConnected to connected of current configuration of VPNservice | |
if isConnected then | |
disconnect VPNservice | |
else | |
connect VPNservice | |
end if |
This file contains 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
tell application "iTunes" | |
repeat with s in sources | |
if (kind of s is iPod) then update s | |
end repeat | |
end tell |
This file contains 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
set theIP to do shell script "ifconfig | grep 'broadcast' | awk '{print $2}'" | |
tell application "LaunchBar" to display in large type theIP with title "Internal IP Address:" | |
return theIP |
This file contains 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
set theIP to do shell script "curl -sf http://checkip.dyndns.org/|cut -d ':' -f 2|cut -d '<' -f1|sed -e 's/ //g'" | |
tell application "LaunchBar" | |
display in large type theIP with title "External IP Address:" | |
end tell | |
return theIP |