Skip to content

Instantly share code, notes, and snippets.

View Informer's full-sized avatar

James Heffernan Informer

  • Ireland
View GitHub Profile
@Informer
Informer / gist:1af958b6ff493af96ad736695ebef9ee
Created March 5, 2018 12:48 — forked from mhawksey/gist:3007293
Turn Google Site pages into RSS feed
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@Informer
Informer / uncconvert.py
Created February 14, 2017 09:24 — forked from martineno/uncconvert.py
UNC to SMB OS X Text Service

I run into UNC paths fairly often and they can be a pain to deal with on OS X. So I wrote a little text service action that helps with this problem.

After you set this up, you will be able to highlight any text in a text field, right click and have the text converted from a UNC path to a smb:// style URL. This is especially helpful when using these in Finder with the Go -> Connect to Server dialog box.

To use this:

  1. Open Automator
  2. Select File -> New
  3. For the document type, choose "Service"
  4. Add the "Run Shell Script" action
@Informer
Informer / TypeFileOut.py
Created January 11, 2016 15:55 — forked from stuartlangridge/TypeFileOut.py
Sublime Text 2 Python plugin to "type" the file that's currently being edited, character by character, for screencasts.
import sublime, sublime_plugin
BLOCKLEN = 4
class TypeFileOutCommand(sublime_plugin.TextCommand):
def nextchar(self):
if self.body:
totype = []
while 1:
try:
@Informer
Informer / tweet-quicktag.php
Created January 8, 2016 13:35 — forked from zoerooney/tweet-quicktag.php
Code to add inline click-to-tweet links in WordPress while using the text editor. Full tutorial here: http://zoerooney.com/blog/tutorials/inline-click-to-tweet-functionality/
function add_tweet_quicktag(){ ?>
<script>
// create a new quicktag button labeled "tweet"
QTags.addButton( 'quicktweet', 'tweet', selection_callback );
// on click, it triggers this callback:
function selection_callback(e, c, ed) {
// we want to grab the selected text and we're going to get a URL as well
var selection, postURL, t = this;
@Informer
Informer / uri.js
Created August 24, 2014 18:23 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@Informer
Informer / HorizontalTweets
Last active December 24, 2015 09:18
A simple Processing sketch that writes a string array to screen horizontally, with the font size of each element changing depending on the tweeted frequency of that element.
// use textWidth(yourword)... this function returns how wide in px a word will be
/************** scripted by James Heffernan September 2013 *******************/
// to experiment with this sketch in processing you will need to make your own version of the "ArialMT" font.
String[] words={"tree","bus","car","building","church","ground",
"landscape","roof","dog","cat","owl","pea","carrot","frog","hat","cloud","sky","grass","dawn","tree",