Skip to content

Instantly share code, notes, and snippets.

@coldfumonkeh
coldfumonkeh / azure-pipeline.yml
Created July 10, 2020 04:48
Azure Pipeline Snippet
pool:
vmImage: 'ubuntu-16.04'
stages:
- stage: Testing
jobs:
- job: Lucee4
steps:
- script: |
echo Starting the build
<cfscript>
function airwolfMe(
numeric passCount = 1,
array hexArray = []
){
var aw = '0123456789ABCDEF';
var hexArray = arguments.hexArray;
var hexLine = '';
component extends="taffy.core.resource" taffy_uri="/artists" {
/**
* Makes the GET request
*
* @limit The maximum number of records to return per call. Defaults to 5
* @offset The number of records to skip when making the request *used for pagination)
*/
function get(
numeric limit = 5,
// When you have the details stored in the SESSION scope
application.objMonkehTweet.setFinalAccessDetails(
oauthToken = session['accessToken'],
oauthTokenSecret = session['accessSecret'],
userAccountName = session['screen_name']
);
// When you want to directly pass in the details
@coldfumonkeh
coldfumonkeh / youtube.cfm
Created October 30, 2015 11:39 — forked from misterdai/youtube.cfm
Youtube cfm?
<cfscript>
urls = [
'//www.youtube-nocookie.com/embed/up_lNV-yoK4?rel=0',
'http://www.youtube.com/user/Scobleizer##p/u/1/1p3vcRhsYGo',
'http://www.youtube.com/watch?v=cKZDdG9FTKY&feature=channel',
'http://www.youtube.com/watch?v=yZ-K7nCVnBI&playnext_from=TL&videos=osPknwzXEas&feature=sub',
'http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I',
'http://www.youtube.com/user/SilkRoadTheatre##p/a/u/2/6dwqZw0j_jY',
'http://youtu.be/6dwqZw0j_jY',
'http://www.youtube.com/watch?v=6dwqZw0j_jY&feature=youtu.be',
(* 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 / 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.

authStruct = application.objMonkehTweet.getAuthorisation(
callbackURL='http://127.0.0.1:8500/monkehTweet/authorize.cfm'
);
<cfquery dbtype="query" name="qryFilter">
SELECT *
FROM qryTweets
WHERE from_user_id =
<cfqueryparam cfsqltype="cf_sql_numeric" value="6499262" />
</cfquery>
<!--- Make the request to the API --->
<cfhttp
url="http://search.twitter.com/search.json?q=coldfusion&rpp=10"
method="get"
result="jsonTweets" />
<!--- Convert JSON to array of structs --->
<cfset jsonData = deserializeJSON(jsonTweets.fileContent) />
<!--- Check we have records returned to us --->