Skip to content

Instantly share code, notes, and snippets.

View macx's full-sized avatar
🚲

David Maciejewski macx

🚲
View GitHub Profile
@cheeaun
cheeaun / horizontal-scroll.ahk
Created August 4, 2009 03:18
AutoHotkey: Shift + Wheel for horizontal scrolling
; Shift + Wheel for horizontal scrolling
+WheelDown::WheelRight
+WheelUp::WheelLeft
@bkeating
bkeating / howto-filemerge-git-osx.md
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

@nathos
nathos / amznshortener.js
Created May 25, 2010 20:39
AmznShortener - Javascript bookmarket source for an Amazon.com short-link generator.
(function(){
var aff = 'nathos-20'; // replace 'nathos-20' with your Amazon affiliate ID, including the '-20'
if (!document.getElementById('ASIN')) {
alert('Can\'t find an Amazon product ID');
return;
}
var asin = document.getElementById('ASIN').value;
prompt(
'Here is the shortened affiliate link:',
'http://amzn.com/' + asin + '?tag=' + aff);
@FabianBeiner
FabianBeiner / GoogleURLShortener.Example.php
Created January 11, 2011 10:03
A Google URL Shortener Class using the new API
<?php
// Examples!
require_once 'GoogleURLShortener.php';
// Shorten an URL.
$strLongUrl = 'http://www.github.com';
if ($strShortUrl = GoogleURLShortener::shorten($strLongUrl)) {
echo $strLongUrl . ' shortened: ' . $strShortUrl . '<br>';
}
@lukemorton
lukemorton / event-source.html
Created June 1, 2011 16:46 — forked from rwaldron/event-source.html
EventSource: The Glorified Long Polling Machine
Open your console.
<script src="event-source.js"></script>
@stephanschubert
stephanschubert / optimized_google_plusone.js
Created June 7, 2011 17:48
Optimized Google PlusOne Javascript - Asynchronous/Non-Blocking, Minimal + SSL Fix
<!-- Place this tag just before your close body tag and NOT in your <head> -->
<script>
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = 'https://apis.google.com/js/plusone.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

@tzarskyz
tzarskyz / Custom Searches.md
Created July 8, 2011 17:39 — forked from fixlr/Custom Searches.md
Some of my current Alfred shortcuts
@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation