Skip to content

Instantly share code, notes, and snippets.

View jaygooby's full-sized avatar
✏️
working on https://writiny.com in my sparse spare time

Jay Caines-Gooby jaygooby

✏️
working on https://writiny.com in my sparse spare time
View GitHub Profile
@jaygooby
jaygooby / dropbox
Created June 18, 2012 14:29
/etc/init.d script for dropbox on Ubuntu
#!/bin/sh
#
# Copied from http://forums.dropbox.com/topic.php?id=38529#post-414344
# Modified by [email protected] (@jaygooby on Twitter)
### BEGIN INIT INFO
# Provides: dropbox
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
@jaygooby
jaygooby / invite.xml
Created May 24, 2012 14:39
Invite a user to a MUC room
<message to="[email protected]" id="ab23a" >
<x xmlns="http://jabber.org/protocol/muc#user">
<invite to="[email protected]" />
</x>
</message>
@jaygooby
jaygooby / git_notes.md
Last active April 2, 2025 13:18
Git, you bloody git
We've received a report that your instance(s):
Instance Id: i-9ab75ffa
IP Address: 174.129.162.143
has been port scanning remote hosts on the Internet; check the information provided below by the abuse reporter.
This is specifically forbidden in our User Agreement: http://aws.amazon.com/agreement/
gem 'apn_sender', :require => 'apn'
gem 'daemons'
@jaygooby
jaygooby / Sebastian Coe spam.txt
Created April 16, 2012 18:34
Best spam of the week
From: <Sebastian Coe> [email protected]
Dear Sir/Madam
I am an Agent to London 2012 Olympics organising commitee (LOCOG). I play an intermediary role between local organizing committee (LOC) and any interested foreign company in any international competitive tender and my commission is usually 2%
of the total contract value.
I wish to know if your company or you as an individual will be interested to participate in an international Tender for the supply of the following items:
1) T-shirt
2) Umbrellas/Tents,
@jaygooby
jaygooby / gist:2170045
Created March 23, 2012 12:02
Replacing text nodes http://stackoverflow.com/a/1175796/391826 patched for MSIE
function htmlreplace(a, b, element) {
if (!element) element = document.body;
var nodes = element.childNodes;
for (var n=0; n<nodes.length; n++) {
// MSIE doesn't have Node
if (nodes[n].nodeType == 3) {
var r = new RegExp(a, 'gi');
// MSIE8 and less doesn't have textContent
if (nodes[n].textContent) {
@jaygooby
jaygooby / .screenrc
Created March 5, 2012 21:48
Good default .screenrc that remaps CTRL-a to CTRL-g and lists open screens in a menu
# None of my own work. Munged from various other .screenrc recipes
#
# Don't use CTRL-A as the trigger because its stops the bash
# cli navigation like CTRL-A for start of line to stop working
escape ^Gg
# We'd like to scroll in an xterm please
defscrollback 1024
# http://superuser.com/questions/126606/how-to-get-mac-os-x-terminal-app-and-screen-vim-scrolling-to-play-nice/316900#316900
@jaygooby
jaygooby / strip_related_videos.php
Created November 4, 2011 13:51
Always put a rel=0 attribute on Youtube embedded videos so that related videos aren't shown at the end
@jaygooby
jaygooby / os-x-ghostscript-imagemagick
Last active March 9, 2018 16:06
Download and install imagemagick plus configure automator app for converting PDFs to PNGs
#!/usr/bin/env bash
# Install using:
# bash < <(curl -s https://gist.githubusercontent.com/jaygooby/1248106/raw/6d8ef1c0c84a47a34a6890973c8d32d22466a736/os-x-ghostscript-imagemagick)
IM_TGZ=ImageMagick-x86_64-apple-darwin17.3.0.tar.gz
IM_URL=https://www.imagemagick.org/download/binaries/$IM_TGZ
IM_TMP_FILE=/tmp/$(basename $IM_URL)
IM_SUM="33849 17409"