Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View busches's full-sized avatar

Scott Busche busches

  • Des Moines, Iowa
View GitHub Profile
<cfscript>
data = ['a','b','a'];
counts = {};
for (datum in data) {
if (!structKeyExists(counts, datum)) {
counts[datum] = 0;
}
counts[datum] = counts[datum]++;
}
writeDump(counts); // all zeros
@busches
busches / gist:af4975a9eefbbb8e3ca7
Last active August 29, 2015 14:13
Change log of nightlies
export WORKSPACE=/home/scott/Dropbox/CM
export CHANGESPATH=$WORKSPACE/CHANGES-$(date -u +%Y%m%d).txt
rm $CHANGESPATH 2>/dev/null
# export CM_NIGHTLY
# get the name of the file we just built
lastBuild=$(ls -lt $WORKSPACE/cm*.zip | sed -e "s/ / /" | cut -d ' ' -f9 | head -1)
echo $lastBuild
# get the name of the file we built prior to that
<?xml version="1.0"?>
<!DOCTYPE Configure
PUBLIC '-//Jetty//Configure//EN'
'http://www.eclipse.org/jetty/configure_9_0.dtd'>
<!-- =============================================================== -->
<!-- Mixin the RewriteHandler -->
<!-- =============================================================== -->
<Configure class="org.eclipse.jetty.server.Server" id="Server">
<!-- =========================================================== -->
<!-- configure rewrite handler -->
@busches
busches / Build.sh
Created March 4, 2015 02:27
CM Build Script
#!/usr/bin/env bash
# colorization fix in Jenkins
export CL_RED="\"\033[31m\""
export CL_GRN="\"\033[32m\""
export CL_YLW="\"\033[33m\""
export CL_BLU="\"\033[34m\""
export CL_MAG="\"\033[35m\""
export CL_CYN="\"\033[36m\""
export CL_RST="\"\033[0m\""
@busches
busches / gist:1c495760900094e017ac
Created April 14, 2015 12:57
Find duplicate IDs and print the elements to console
var allElements = document.getElementsByTagName("*");
var allIds = {};
var found = false;
for (var i = 0, n = allElements.length; i < n; ++i) {
var id = allElements[i].id;
if (id) {
if (allIds[id] === undefined) {
allIds[id] = [];
}
allIds[id].push(allElements[i]);
@busches
busches / ConEmu-2015-05-05-p47904.log
Created May 5, 2015 17:29
Complex package.json hangs on npm install -dd
This file has been truncated, but you can view the full file.
C:\Users\buschs1\Desktop\the_closure_ci
λ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- frontend-maven-plugin:0.0.23:install-node-and-npm (install node and npm) @ test ---
[INFO] Node v0.12.2 is already installed.
@busches
busches / npm log -ddd
Created May 5, 2015 17:30
Complex package.json hangs on npm install -ddd
This file has been truncated, but you can view the full file.
C:\Users\buschs1
λ λ cd deDesktop\the_closure_ci\
C:\Users\buschs1\Desktop\the_closure_ci
λ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0
@busches
busches / package.json
Created May 5, 2015 17:35
Complex package.json
{
"name": "calendar",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"bower": "^1.4.1",
"browser-sync": "~2.5.2",
"browser-sync-spa": "~1.0.2",
"chalk": "~1.0.0",
"concat-stream": "~1.4.7",
@busches
busches / Simple npm log -ddd
Created May 5, 2015 17:36
Simple package.json hangs on npm install -ddd
This file has been truncated, but you can view the full file.
C:\Users\buschs1
λ λ cd deDesktop\npmBug\
C:\Users\buschs1\Desktop\npmBug
λ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0
@busches
busches / package.json
Created May 5, 2015 17:38
Simple package.json
{
"name": "npmBug",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"browser-sync": "~1.7.1",
"karma": "^0.12.31"
}
}