This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Convert an OTF font into TTF an EOT formats. | |
# @source: http://stackoverflow.com/a/2467452/179015 | |
# @note: brew install fontforge | |
# brew install | |
# @usage: sh otf2ttf2eot.sh FontName | |
otfFont="$1.otf" | |
ttfFont="$1.ttf" | |
eotFont="$1.eot" | |
fontforge -c ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
#Rewrite FW/1 Subsystem | |
RewriteRule ^admin/(.*)$ index.cfm/admin:$1 [L] | |
#Rewrite index.cfm | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !^.*\.(bmp|css|gif|htc|html?|ico|jpe?g|js|pdf|png|swf|txt|xml)$ | |
RewriteRule ^(.*)$ index.cfm/$1 [NS] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Convert CSV file to a ColdFusion query object using opencsv. | |
Requirements: | |
- ColdFusion 8+ ( http://en.wikipedia.org/wiki/Adobe_ColdFusion ) | |
- opencsv - free parser library for Java ( http://opencsv.sourceforge.net/ ) | |
http://opencsv.sourceforge.net/ | |
opencsv supports all the basic csv-type things you're likely to want to do: | |
- Arbitrary numbers of values per line | |
- Ignoring commas in quoted elements | |
- Handling quoted entries with embedded carriage returns (ie entries that span multiple lines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install necessary packages | |
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils | |
## get kvm unloaded so virtualbox can load | |
$ sudo modprobe -r kvm_amd kvm_intel | |
$ sudo service virtualbox stop | |
$ sudo service virtualbox start | |
## URL to most recent cloud image of 12.04 | |
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate new personal ed25519 ssh key | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network | |
eval "$(ssh-agent -s)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// Byte arrays. Binary data is represented by an array of bytes. | |
// And, each byte is represented by an integer. For simple values, | |
// we don't have to manually cast each value - we can just pass-in | |
// the array and ColdFusion will perform the cast. | |
// Test 1 - Spell "SARAH" with ColdFusion numbers. | |
bytes = javaCast( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ember.Handlebars.helper('filesize', function(value) { | |
if (typeof value === 'undefined') { | |
return null; | |
} | |
var i, | |
filesize, | |
units = ['B', 'KB', 'MB', 'GB', 'TB']; | |
for (i = 0; i < units.length; i++) { | |
if (value < 1024) { | |
filesize = Math.floor(value) + units[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfparam name="url.x" default="1;delete from x"> | |
<cfset esapi = CreateObject("java", "org.owasp.esapi.ESAPI").encoder()> | |
<cfset codec = createObject("java","org.owasp.esapi.codecs.MySQLCodec").init(0)> | |
<cfset url.x = esapi.encodeForSQL(codec, url.x)> | |
<cfquery name="q" datasource="amex"> | |
select * from [users] | |
where id like #url.x# | |
</cfquery> | |
<cfdump var="#q#" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*---------- Declare gulp variables ----------*/ | |
var gulp = require('gulp'), | |
jshint = require('gulp-jshint'), | |
csslint = require('gulp-csslint'), | |
compass = require('gulp-compass'), | |
connect = require('gulp-connect'), path = require('path'), | |
livereload = require('gulp-livereload'), | |
clean = require('gulp-clean'), |