Skip to content

Instantly share code, notes, and snippets.

View iknowkungfoo's full-sized avatar

Adrian J. Moreno iknowkungfoo

View GitHub Profile
FOO.moduleName = function () {
// Private variables, global to the module.
let fieldX; // This value will be changed.
const foo; // This value will not change.
/**
* Constructor
*/
{
"terminal.integrated.profiles.windows": {
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
@iknowkungfoo
iknowkungfoo / VSCode-Terminal-DraculaPlus-settings.json
Last active May 24, 2021 02:43
VSCode version of the iTerm2 Dracula+ color theme (https://iterm2colorschemes.com/) VSCode > Preferences > Settings > Workbench > Appearance > Color Customization - Edit in settings.json
{
"workbench.colorCustomizations": {
"terminal.background": "#212121",
"terminal.foreground": "#f8f8f2",
"terminalCursor.background": "#f8f8f2",
"terminalCursor.foreground": "#f8f8f2",
"terminal.ansiBlack": "#212121",
"terminal.ansiBlue": "#82aaff",
"terminal.ansiBrightBlack": "#626483",
"terminal.ansiBrightBlue": "#82aaff",
@iknowkungfoo
iknowkungfoo / web.config
Created February 10, 2020 03:05
IIS SQL Injection Request Filtering
<filteringRules>
<filteringRule name="SQLInjection" scanQueryString="true">
<appliesTo>
<clear />
<add fileExtension=".asp" />
<add fileExtension=".aspx" />
</appliesTo>
<denyStrings>
<clear />
<add string="@@version" />
@iknowkungfoo
iknowkungfoo / ColdFusion: Array of Structs to XML
Created June 6, 2019 15:43
ColdFusion function to convert an array of structs to proper XML.
<cffunction name="arrayOfStructsToXML" access="public" output="false" returntype="any">
<cfargument name="data" type="array" required="true">
<cfscript>
var buffer = createObject("java","java.lang.StringBuilder").init('');
var y = arrayLen(arguments.data);
var xData = "";
buffer.append('<games>');
for (local.x = 1; local.x <= local.y; local.x++) {
local.stGame = arguments.data[local.x];
buffer.append('<game>');
<cfoutput>
<cfloop from="1" to="#len(loadFields.body)#" index="q">
[#asc(mid(loadFields.body, q, 1))#]-
</cfloop>
</cfoutput>
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/adrianmoreno/.oh-my-zsh
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
# Set name of the theme to load. Optionally, if you set this to "random"
@iknowkungfoo
iknowkungfoo / blogcfc_to_markdown_03.cfm
Last active October 6, 2018 17:07
Convert BlogCFC blog posts to markdown files, which can then be imported into Jekyll static sites like Github Pages and Gitlab Pages. https://adrianmoreno.com/2018/10/06/converting-blogcfc-posts-to-markdown.html
<cfsavecontent variable="post">---
layout: post
title: "#blogTitle#"
date: #blog.post_date# #blog.post_time# -0500
categories: #blog.post_categories#
redirect_from:
- /blog/index.cfm/#year(blog.post_date)#/#month(blog.post_date)#/#day(blog.post_date)#/#blog.post_alias#/
- /blog/index.cfm/#year(blog.post_date)#/#month(blog.post_date)#/#day(blog.post_date)#/#blog.post_alias_lower#/
---
@iknowkungfoo
iknowkungfoo / blogcfc_to_markdown_02.cfm
Last active October 6, 2018 17:07
Convert BlogCFC blog posts to markdown files, which can then be imported into Jekyll static sites like Github Pages and Gitlab Pages. https://adrianmoreno.com/2018/10/06/converting-blogcfc-posts-to-markdown.html
<cfoutput>
<cfloop query="blog">
<cfset blogPost = blog.post_more>
<cfif len(blogPost) GT 0>
<cfset blogPost = reReplaceNoCase(blogPost, "\<\/h[0-9]\>", "", "all")>
<cfset blogPost = reReplaceNoCase(blogPost, "\<\h1\>", "#chr(35)# ", "all")>
<cfset blogPost = reReplaceNoCase(blogPost, "\<\h2\>", "#chr(35)##chr(35)# ", "all")>
<cfset blogPost = reReplaceNoCase(blogPost, "\<\h3\>", "#chr(35)##chr(35)##chr(35)# ", "all")>
<cfset blogPost = reReplaceNoCase(blogPost, "\<\h4\>", "#chr(35)##chr(35)##chr(35)##chr(35)# ", "all")>
<cfset blogPost = reReplaceNoCase(blogPost, "\<\h5\>", "#chr(35)##chr(35)##chr(35)##chr(35)##chr(35)# ", "all")>
/*
******* Run on both main and US Soccer databases ********
*/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION dbo.integerListToTable ( @strString varchar(max))