Skip to content

Instantly share code, notes, and snippets.

View joet3ch's full-sized avatar

Joe Nicosia joet3ch

View GitHub Profile
@joet3ch
joet3ch / send_love.applescript
Created March 9, 2013 02:20
Send some iMessage love
tell application "Messages"
set myid to get id of first service
set mygf to buddy "gf@example.com" of service id myid
send "<3" to mygf
end tell
@drakkhen
drakkhen / gist:5473067
Last active December 21, 2020 14:30
Workaround for Ubuntu guest suspension warning in VMware Fusion

I see this error when I try to suspend an Ubuntu 10 guest in Fusion:

The request to Suspend this virtual machine failed because the corresponding VMware Tools script did not run successfully.

If you have configured a custom suspend script in this virtual machine, make sure that it contains no errors. Attempting the operation again will ignore the script failure. You can also submit a support request to report this issue.

As the dialog states, the second time you try to suspend the VM it ignores the non-zero return code of the script and it seems to work. But it's annoying.

The problem appears to not be VMware actually, but Ubuntu (or Ubuntu's service script). I tried to figure out where exactly Ubuntu's initctl configuration/scripts is broken to no avail but found a work-around that I'm happy with.

@robmathers
robmathers / readinglisturls.py
Last active November 16, 2023 21:18
Prints out URLs of items in Safari’s Reading List
#!/usr/bin/env python
import plistlib
from shutil import copy
import subprocess
import os
from tempfile import gettempdir
import sys
import atexit
BOOKMARKS_PLIST = '~/Library/Safari/Bookmarks.plist'
@joet3ch
joet3ch / gist:5a1ac5b895eae5937147
Last active August 29, 2015 14:04
Incident Message - Message Template Example
Status update from *|STATUSPAGENAME|*
Current Status: *|CURRENTSTATUS|*
Started: *|TIMESTART|*
Resolved: *|TIMERESOLVE|*
Affected Infrastructure:
Components: *|AFFECTEDCOMPONENTS|*
Locations: *|AFFECTEDCONTAINERS|*
@joet3ch
joet3ch / gist:bf4d4523c8f22ad50161
Last active August 29, 2015 14:04
Maintenance Reminder - Message Template Example
Scheduled maintenance reminder from *|STATUSPAGENAME|*
Title: *|MAINTENANCETITLE|*
Details: *|MAINTENANCEDETAILS|*
Affected Infrastructure:
Components: *|AFFECTEDCOMPONENTS|*
Locations: *|AFFECTEDCONTAINERS|*
@joet3ch
joet3ch / gist:6157bb9cac0b33bb9bc5
Last active August 29, 2015 14:04
Maintenance Update - Message Template Example
Maintenance update from *|STATUSPAGENAME|*
Title: *|MAINTENANCETITLE|*
Affected Infrastructure:
Components: *|AFFECTEDCOMPONENTS|*
Locations: *|AFFECTEDCONTAINERS|*
Update: *|UPDATEMESSAGE|*
@GABeech
GABeech / haproxy.cfg
Created August 21, 2014 18:35
Stack Exchange HAProxy
# This is an example of the Stack Exchange Tier 1 HAProxy config
# The only things that have been changed from what we are running are:
# 1. User names have been removed
# 2. All Passwords have been remove
# 3. IPs have been changed to use the example/documentation ranges
# 4. Rate limit numbers have been changed to randome numbers, don't read into them
userlist stats-auth
group admin users $admin_user
user $admin_user insecure-password $some_password