Skip to content

Instantly share code, notes, and snippets.

@phantom42
phantom42 / Sachin Schekar names
Last active April 26, 2018 17:28
Deleted/Renamed SF/F UserIDs
============================================
|Name | Est Date |
============================================
|Sachin Shekar | Aug 2012 |
|SS-3.1415926535897932384626433 | Nov 2015 |
|SS-3 | Jan 2016 |
|I Love You | Apr 2017 |
|I Am Groot | May 2017 |
|Sachin Stark | Jul 2017 |
|Atomic Blonde | Aug 2017 |
@phantom42
phantom42 / HNQHider.js
Created July 27, 2017 04:00
This GreaseMonkey script hides the Hot Network Questions from StackOverflow and the StackExchange network.
// ==UserScript==
// @name HNQ Hider
// @namespace colemancodes.com
// @description Hides Stackexchange HNQ
// @include *://*.stackexchange.com/*
// @include *://*.stackoverflow.com/*
// @version 1
// @grant none
// ==/UserScript==
document.getElementById('hot-network-questions').style.display = 'none';
@phantom42
phantom42 / dump.cfm
Last active August 22, 2016 17:51
CF to dump scopes - especially useful for debugging or working on pages you're unfamiliar with
<!--- local/variable scope --->
<cfdump var="#getPageContext().getVariableScope()#" expand="false" label="variable scope"/>
<!--- all scopes LT cf10 --->
<cfdump var="#getPageContext().getBuiltInScopes()#"/>
<!--- all scopes cf10+ --->
<cfdump var="#getPageContext().getCFScopes()#"/>
@phantom42
phantom42 / logger.sublime-snippet
Last active July 22, 2016 13:43
logger snippet for sublimetext. type "logger" and hit TAB. then TAB through to each of the fields to replace logging markers. instructions: Tools -> New Snippet -> (paste this in) -> save
<snippet>
<content><![CDATA[
<cflog text='$TM_FILENAME ${1:mark} ${2:1}' file='${3:application}'>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>logger</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>text.html.cfm</scope> -->
</snippet>
@phantom42
phantom42 / cfdump-sublime-snippet
Last active May 11, 2016 14:26
instructions: Tools -> New Snippet -> (paste this in) -> save
<snippet>
<content><![CDATA[
<cfdump var="$1" label="$2" format="html" output="${3:c:\debug.html}" expand="${4:false}">
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>dumpvar</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html.cfm</scope>
</snippet>
SELECT *
FROM table a
WHERE A.column_name IN (
SELECT REGEXP_SUBSTR('1,2,3','[^,]+', level) FROM dual
CONNECT BY REGEXP_SUBSTR('1,2,3', '[^,]+', level) is not null
)
@phantom42
phantom42 / gist:6000014
Last active December 19, 2015 18:38
command to export list of file names to a text file
dir /A:-D /N /S /B > filenames.txt
forfiles /S /C "cmd /c echo @path0x09@fsize0x09@fdate" > filenames.txt
for %f in (*.txt) do type "%f" >> combined.txt
@phantom42
phantom42 / __anchors without href.css
Created April 29, 2013 17:06
selector to style simple anchor tags not being used for links.
a:not([href]) {
/* Styles for anchors without href */
}
@phantom42
phantom42 / ie8_console_alert.js
Created April 22, 2013 16:26
console.log override function for browsers without console object - such is IE8 if debugging is not enabled.
var alertFallback = true;
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
if (alertFallback) {
console.log = function(msg) {
alert(msg);
};
} else {
console.log = function() {};
}
@phantom42
phantom42 / IE8-indexOf.js
Created April 19, 2013 17:38
custom function to emulate indexOf method which is not supported by some browsers (IE8)
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(obj, start) {
for (var i = (start || 0), j = this.length; i < j; i++) {
if (this[i] === obj) { return i; }
}
return -1;
}
}