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
#!/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' |
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
#!/bin/sh | |
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
# Uses curl to be compatible with machines that don't have wget by default | |
# modified by Ross Hosman for use with cloudflare. | |
cfkey= | |
cfuser= | |
cfhost= | |
WAN_IP=`curl -s http://ip.skafari.com` |
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
sudo vi /Library/LaunchDaemons/org.mongo.mongod.plist | |
sudo chown root:wheel /Library/LaunchDaemons/org.mongo.mongod.plist | |
sudo launchctl load /Library/LaunchDaemons/org.mongo.mongod.plist | |
sudo launchctl start org.mongo.mongod |
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
#/bin/bash | |
public_name=$(curl -s http://169.254.169.254/latest/meta-data/public-hostname) | |
echo $public_name |
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 "Remote Desktop" | |
activate | |
set server to first computer of computer list "All Computers" whose Internet address is "10.10.10.10" | |
control server | |
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
do shell script "open vnc://some-box" |
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 "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 |
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
ObjectId = require("mongoose").Types.ObjectId | |
new ObjectId('xxxx') |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>PUT</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> | |
</CORSRule> |
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
def web_cluster(): | |
env.user = 'ubuntu' | |
env.key_filename = ['mykey.pem'] | |
env.conftype = 'prod' | |
env.project = 'sample' | |
ec2conn = ec2.connection.EC2Connection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) | |
web_group = ec2conn.get_all_security_groups(groupnames=['web']) | |
for i in web_group[0].instances(): | |
hostname = i.__dict__['public_dns_name'] |
NewerOlder