Skip to content

Instantly share code, notes, and snippets.

@jefftougas
jefftougas / crossdomain.xml
Created April 18, 2011 21:10
An (un)proper crossdomain file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="*" secure="false" />
<allow-http-request-headers-from domain="*" headers="*" secure="false" />
</cross-domain-policy>
@jefftougas
jefftougas / gist:2404950
Created April 17, 2012 09:47
flash player installation text
<p>
To view this page ensure that Adobe Flash Player version
10.2.0 or greater is installed.
</p>
<a href='http://www.adobe.com/go/getflashplayer'><img src='//www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>
python -m SimpleHTTPServer 8000
foobar
@jefftougas
jefftougas / 1__bash.png
Last active August 29, 2015 13:56
my ps1
1__bash.png
@jefftougas
jefftougas / brew-sync.sh
Created January 1, 2016 15:07 — forked from witt3rd/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@jefftougas
jefftougas / brew-perms.sh
Created August 25, 2016 04:12 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@jefftougas
jefftougas / dyndns53.py
Created March 29, 2017 20:28 — forked from vrypan/dyndns53.py
Python script to add/update an A record at amazon area53 DNS service, using current IP. (ie, dyndns replacement)
from area53 import route53
from boto.route53.exception import DNSServerError
import requests
import sys
from datetime import datetime
# Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/
domain = 'domain.tld'
subdomain = 'subdomain_name'
const pack = require('./package.json');
const validateDeps = (packageJson, dependencyType, offenderRegex, message = `Invalid version syntax in ${dependencyType} based on ${offenderRegex}!`) => {
const deps = new Map(Object.entries(pack[dependencyType]));
[...deps.keys()]
.filter((name) => deps.get(name).match(offenderRegex))
.forEach((name) => {
console.log(`${name}: ${deps.get(name)} -- ${message}`);
});