Skip to content

Instantly share code, notes, and snippets.

View jonDowdle's full-sized avatar

Jon Dowdle jonDowdle

View GitHub Profile
CmdUtils.CreateCommand({
name: "show-tweets",
homepage: "http://www.jdowdle.com/",
author: { name: "Jon Dowdle", email: "jdowdle@gmail.com" },
license: "MPL",
_userSelection: function(input){
var userSelection = input ? input:CmdUtils.getSelection();
return userSelection;
<cfscript>
cKey = '68gG2okEZUOrl0dNKQeNPQ';
cSecret = 'qqPHVYLSjrJ4J9wDysQ9eAHenLiB2dYPdwsfLtTmQ';
reqUrl = 'https://twitter.com/oauth/request_token';
authUrl = 'http://twitter.com/oauth/authorize';
accessUrl = 'http://twitter.com/oauth/access_token';
</cfscript>
<cfhttp url="#reqUrl#" method="get" redirect="false">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Web Project</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js""></script>
<script type="text/javascript">
$(function(){
// Begin overriding jQuery data()
// Make all elements with the class 'photo' into a taggable object
$('.photo').taggable({
tags: '#tags .tag.active',
tagged: onTag ,
untagged: onUntag
});
/**
* Handler for the 'tag' event. When this fires,
* this handler will send the tag data to
@jonDowdle
jonDowdle / Twitter.cfc
Created September 7, 2010 18:16
Easy way to use twitter4j with ColdFusion
<cfcomponent output="false">
<cffunction name="init" returntype="Twitter">
<cfargument name="consumerKey" required="true">
<cfargument name="consumerSecret" required="true">
<cfargument name="authKey" type="string" required="false" default="">
<cfargument name="authSecret" type="string" required="false" default="">
<cfscript>
var local = {};
@jonDowdle
jonDowdle / eclipse.ini
Created October 18, 2010 00:19
My current eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.java.product
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
@jonDowdle
jonDowdle / gist:638836
Created October 21, 2010 16:44
CFEclipse Template
<cffunction name="test_${line_selection}" returntype="void" access="public">
<cfset var result = obj.answer('${question}')>
<cfset var expected = '${expected}'>
<cfset assertEquals( expected,result,"Result should've been '#expected#' but was '#result#'")>
</cffunction>
@jonDowdle
jonDowdle / Gist.md
Created July 28, 2012 17:11
Testing Gist.IO

Testing Gist.IO

A sub heading

  • Test bullet
  • Test bullet
  • Test bullet
  • Test bullet
  • Test bullet
@jonDowdle
jonDowdle / git-cheatsheet.md
Last active December 20, 2015 07:09
Handy git commands

Finding

  1. Find deleted files git log --diff-filter=D --summary
  2. Find specific deleted file git log --diff-filter=D --summary | grep -C 10 filename.html

Cleaning

  1. Remove untracked files
@jonDowdle
jonDowdle / reversed-strings-kata-recursive.js
Last active December 31, 2015 15:09
A quick morning brain warmup. Instead of using the array method reverse, I decided to refresh my recursion skills a bit. I'm glad I did. I find this solution quite a bit more elegant (to the eyes that is). http://www.codewars.com/dojo/katas/5168bb5dfe9a00b126000018/
/*
* Reverse whatever string is passed into solution.
* solution('world'); // returns 'dlrow'
*
*/
function solution( str ) {
// Our answer
var answer = "";