Skip to content

Instantly share code, notes, and snippets.

<div class="row">
<div class="col1">
<img src="">
<h5></h5>
<p></p>
<p>
<a href="">View</a><span class="divider">|</span><a href="">Download</a>
</p>
</div>
<div class="col2">
@steve-ross
steve-ross / modman-install
Last active August 29, 2015 14:05
testing modman installer fix
#!/usr/bin/env bash
if [ ! -d "$HOME/bin" ] ; then
mkdir $HOME/bin
if [ -f $HOME/.profile ]; then
tty -s && . $HOME/.profile
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then
echo -e '\nPATH="$HOME/bin:$PATH"' >> $HOME/.profile
{
"AAPL": {
"price": "500.99"
}
}
{
"AAPL": {
"price": "500.99"
}
}
@steve-ross
steve-ross / test-queue.js
Last active August 29, 2015 14:06
ticker with queue
var fs = require('fs');
var async = require('async');
function updateJson(ticker, value, cb) {
async.waterfall([
function(next){
fs.readFile('stocktest.json', next);
},
@steve-ross
steve-ross / turpentine_esi.xml
Created October 6, 2014 19:22
turpentine_esi for Magento 1.9 Demo Store
<?xml version="1.0"?>
<!--
Nexcess.net Turpentine Extension for Magento
Copyright (C) 2012 Nexcess.net L.L.C.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Adding SFTP-only user to Ubuntu Server

To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.

Directions

  1. Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:

     Match group filetransfer
    

ChrootDirectory %h

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Steven Ross">
<style type="text/css" media="screen">
class reader:
def __init__(self):
self.s = str
def main(self, part='body'):
for req in self.requests():
#self.body = {'response': req['body']}
return req[part]
#self.respond(data={"response": req['body']})
@steve-ross
steve-ross / ObjectFactory.cfc
Created June 15, 2012 14:34
Object Factory
<cfcomponent output="false" hint="Object Factory for Singleton instantiation">
<!--- cleanup cache will only be called on every 500th call to the get function (will rehash the table) --->
<cfset this.currentCacheInterval = 1 />
<cfset this.cacheClearIntervalInMinutes = 180 />
<cffunction name="init">
<cfargument name="isDebug" type="boolean" required="false" hint="pass in true to reload every time" default="false" />
<cfscript>
setCacheTime();