Skip to content

Instantly share code, notes, and snippets.

@isapir
isapir / TwitterAPI.cfc
Last active October 28, 2016 16:10
TwitterAPI for Lucee
/**
* @Author - Igal Sapir
* @Description - a client for Twitter ReST API v1.1 https://dev.twitter.com/rest/public
*/
component {
/**
* API Key / API Secret - for both Application-Only-Auth and OAuth-Signed Requests
*
* APIkey = "xxxxxxxxxxxxxxxxxxxxxxxxx";
@isapir
isapir / jquery.dragchanged.js
Last active July 22, 2016 23:08
jQuery Plugin That Detects When Drag Begins and Ends
/** simple jQuery plugin that fires an event named "drag:changed" and a boolean
* parameter of isDragging when drag on the passed elements begins or ends
*/
(function($) {
$.fn.dragchanged = function(){
var notDragging = { isDragging: false, isDown: false, offsetX: -1, offsetY: -1 };
return this.each(function(){
# $Id$
# Maintainer: Dan McGee <dan@archlinux.org>
# Contributor: Daniele Paolella <dp@mcrservice.it>
_realname=virtualenv
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
#pkgname=('python-virtualenv' 'python2-virtualenv')
pkgver=14.0.1
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by PostgreSQL configure 9.5.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
@isapir
isapir / threads.cfm
Last active May 11, 2021 15:45
Show Running Threads in Lucee
<html>
<head>
<title>Threads</title>
<style>
body { font-family: sans-serif; }
.vtop td { vertical-align: text-top; }
tr:nth-child(even) { background-color: #f0f0f0; }
tr:nth-child(odd) { background-color: #f8f8f8; }
td, th { padding: 0.25em 0.5em; }
REM ***** BASIC *****
function getScriptVersion()
getScriptVersion = 1.04
end function
function contains(str1 as Variant, str2 as Variant)
@isapir
isapir / Tag.cfc
Last active August 29, 2015 14:16
testcase for mailing list discussion re: custom tags hierarchy
component {
/** cfc custom tag init( boolean hasEndTag, component parent ) */
function init( boolean hasEndTag, component parent ) {
this.name = listFirst(listLast(getCurrentTemplatePath(), '\/'), '.');
this.parent = arguments.parent ?: "{no-parent}";
return this;
<cfscript>
// setup begin
datasource = {
class:"com.mysql.jdbc.Driver"
,connectionString:"jdbc:mysql://localhost/test"
,username:"root"
,password:""
};
#### this is the main config file for nginx, to specify it from the command line, use the -c switch, e.g
#### nginx.exe -c nginx-railo.conf
##** if connecting to Tomcat, use Tomcat's RemoteIpValve to resolve CGI.REMOTE_ADDR, CGI.SERVER_NAME, and CGI.SERVER_PORT_SECURE
##** <Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="X-Forwarded-Proto" remoteIpHeader="X-Forwarded-For" protocolHeaderHttpsValue="https" />
#user nobody;
#pid logs/nginx.pid;
@isapir
isapir / test.cfm
Created August 24, 2012 23:15
new CFMLWriterWhiteSpacePref test cfm file
<h1>F:\Workspace\git\railo21\railo-java\railo-debug\web\test1.cfm</h1>
<DIV> this should be garbled up in DIV 1345854470755:
8888888b. d8b 888 d8888
888 Y88b Y8P 888 d8P888
888 888 888 d8P 888
888 d88P 8888b. 888 888 .d88b. d8P 888
8888888P" "88b 888 888 d88""88b d88 888
888 T88b .d888888 888 888 888 888 8888888888
888 T88b 888 888 888 888 Y88..88P 888