Skip to content

Instantly share code, notes, and snippets.

@coldfumonkeh
coldfumonkeh / README.md
Last active August 29, 2015 14:14
Server Detection Scriptlet.. (WTF is a scriptlet?)

ColdFusion Server Detection

This is a re-imagineering of a ColdFusion code block found here: https://github.com/webdevsourcerer/CF-Server-Detect

It is actually originally noted as a ColdFusion Scriptlet but we have NO frickin' idea what a ColdFusion Scriptlet is (because there is no such thing).

Credits

It's ALWAYS good etiquette to credit and thank those who gave time, skills and knowledge to advance the community and help to improve shitty code.

(* Script to record and tag spotify tracks, by Lloyd Moore *)
(* Modified by Tiffany G. Wilson to resolve audio splitting issues, automate starting/stopping, and add recording customization *)
(* Snippets for controlling Spotify are from Johnny B on tumblr (http://johnnyb.tumblr.com/post/25716608379/spotify-offline-playlist) *)
(* The idea of using delayed tagging/filename updating is from a guest user on pastebin (http://pastebin.com/rHqY0qg9) *)
(* The only thing to change in the script is the output format; you must change the file extension and the recording format to match *)
(* Run this script once a song you want to record is queued (stopped at beginning) or playing *)
(* Running the script will initiate hijacking, recording and audio playback *)
(* To stop script, pause Spotify or wait for album/playlist to end*)
(* To set id3 tags, use application Kid3 (http://sourceforge.net/projects/kid3/) and copy '%{artist} - %{album} - %{track} - %{title}' from file name to Tag 2 *)
@coldfumonkeh
coldfumonkeh / gist:3103552
Created July 13, 2012 08:11 — forked from paulirish/gist:3098860
Open Conference Expectations

Open Conference Expectations

For conferences, it's extremely important that attendees get top-quality content from industry experts. As a highly compelling format of educating others based on experience and research, conferences stand to be one the best sources of refined knowledge available. Still, it's important for a successful event to have a few guidelines to ensure quality content from the best and most appropriate speakers. Below is a set of guidelines for conference organizers that ensure quality content for attendees and the community.

What We, As Speakers, Expect from Conferences

  1. Schedule: Conferences will let speakers know the time and duration of their talk at least two weeks before the event.

  2. A/V & Power: Conferences will provide a quality projector with at least 1024x768 resolution, projected onto a screen that is appropriately sized and readily viewable by all attendees in the room. Conferences will also provide power outlets at the podium.

@coldfumonkeh
coldfumonkeh / pnginator.rb
Created August 6, 2012 13:10 — forked from gasman/pnginator.rb
pnginator: pack Javascript into a self-extracting PNG
#!/usr/bin/env ruby -w
# pnginator.rb: pack a .js file into a PNG image with an HTML payload;
# when saved with an .html extension and opened in a browser, the HTML extracts and executes
# the javascript.
# Usage: ruby pnginator.rb input.js output.png.html
# By Gasman <http://matt.west.co.tt/>
# from an original idea by Daeken: http://daeken.com/superpacking-js-demos
@coldfumonkeh
coldfumonkeh / application.rb
Created October 11, 2012 15:01
Ruby / Sinatra code for PhoneGap Build to automatically force a new request from a Github repository
require 'sinatra'
require 'rest_client'
def get_or_post(path, opts={}, &block)
get(path, opts, &block)
post(path, opts, &block)
end
get '/' do
'Hello world'
@coldfumonkeh
coldfumonkeh / gist:3879792
Created October 12, 2012 15:32
cfmlus link shortcode
[cfmlus_link]
@coldfumonkeh
coldfumonkeh / gist:3879807
Created October 12, 2012 15:34
cfml.us rendered short code
Short URL: <a href="http://cfml.us/Mf" class="">http://cfml.us/Mf</a>
@coldfumonkeh
coldfumonkeh / gist:3879844
Created October 12, 2012 15:39
cfmlus_link display using template method
<?php show_cfmlus_link(); ?>
@coldfumonkeh
coldfumonkeh / gist:3879833
Created October 12, 2012 15:37
cfmlus_link shortcode with attributes
[cfmlus_link title="Any other title here" class="my_link_class"]
@coldfumonkeh
coldfumonkeh / canonicalize_demo.text
Created October 22, 2012 10:15
Use the ESAPI canonicalize security function in ColdFusion 8.01 and 9
<cfset strText = 'Hello, world. This is the &lt;strong&gt;greatest&lt;/strong&gt; example in the world.' />
<!--- Instantiate the ESAPI object. --->
<cfset objESAPI = createObject("java","org.owasp.esapi.ESAPI") />
<!--- Assign the Encoder class to a new variable. --->
<cfset objEncoder = objESAPI.encoder() />
<!--- Canonicalize the provided string. --->
<cfset strClean = objEncoder.canonicalize(strText, false, false) />