Skip to content

Instantly share code, notes, and snippets.


Anthony Petruzzi rip747

View GitHub Profile
rip747 / Rails Setup.txt
Created Oct 17, 2020 — forked from Deanout/Rails Setup.txt
Ruby on Rails 6 Setup Ubuntu 18.04
View Rails Setup.txt
Commands from
Yarn from
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
curl -sSL | bash -s stable --ruby
Restart terminal
rip747 / Other resources
Last active Mar 16, 2019
Rails on Windows: My Notes
View Other resources
Multiple Databases with Rails
Using GUID's As Primary Keys's-As-Primary-Keys
rip747 / web.config
Created Mar 16, 2019
web.config file for Rails on IIS
View web.config
<?xml version="1.0" encoding="UTF-8"?>
rip747 / Files uploaded
Last active Aug 29, 2015
CFML Rack Middleware idea for returning a list of uploaded files
View Files uploaded
// credit to David "MisterDai" Boyer
if (cgi.request_method == 'POST') {
WriteDump(var = form, label = "Form Scope");
for (field in form) {
form[field] = ListToArray(form[field]);
WriteDump(var = form, label = "Form Scope - Parsed");
rip747 / gist:5888011
Created Jun 28, 2013
modified to youtube.cfc for 2.1
View gist:5888011
<cfcomponent displayName="YouTube CFC" output="false">
<cfset variables.authtoken="">
<cfset variables.username="default">
<cfset variables.devkey="">
<cfset variables.standardurl = "">
<cffunction name="init" access="public" returnType="youtube" output="false">
<cfargument name="devkey" type="string" required="true">
rip747 / SublimeText
Created Jun 6, 2012
SublimeText keyboard mapping
View SublimeText
/* erb temnplate plugin */
{ "keys": ["ctrl+shift+z"], "command": "erb" },
/* the mac keyboard layout SUCKS! Make it like windows */
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "words", "forward": true} },
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "words", "forward": true, "extend": true} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
rip747 / gist:2853902
Created Jun 1, 2012
implementing a CFWheels service layer
View gist:2853902
<!--- add the following to the events/onapplicationstart.cfm --->
<cffunction name="initServices" returntype="void" hint="I initialize the services objects for this app">
<cfset var loc = {}>
<cfset application.$_ServiceObjects = {}>
<cfdirectory action="list" directory="#expandPath('services')#" name=""/>
<cfloop query="">
<cfset application.$_ServiceObjects[ListFirst(name, '.')] = createObject("component", "services.#ListFirst(name, '.')#").init()>
<cfset initServices()>
rip747 / gist:1116619
Created Jul 31, 2011
cfwheels api doc generation... idea
View gist:1116619
<cfcomponent extends="Controller">
<cffunction name="index">
<cfsetting showdebugoutput="false">
<cfset releasesDir ="#get('rootpath')##get('filePath')#/releases">
<cfdirectory action="list" directory="#expandPath(releasesDir)#" filter="*.zip" name="releases">
rip747 / wheels tabless model
Created May 19, 2011
wheels tableless model
View wheels tabless model
diff --git a/wheels/model/initialization.cfm b/wheels/model/initialization.cfm
index 3755c2c..24a6c94 100644
--- a/wheels/model/initialization.cfm
+++ b/wheels/model/initialization.cfm
@@ -45,140 +45,144 @@
// run developer's init method if it exists
if (StructKeyExists(variables, "init"))
- // make sure that the tablename has the respected prefix
View cfmiddleware
<cfset $class = {}>
<cffunction name="init">
<cfargument name="relativePath" type="string" default="" hint="the relative component path from the webroot">
<cfset $class.container = []>
<cfset $class.relativePath = arguments.relativePath>