Skip to content

Instantly share code, notes, and snippets.

@tessro
tessro / redis-server
Created December 16, 2009 14:20
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@ryanguill
ryanguill / CFRemoteObjectFactory.as
Last active December 14, 2015 19:29
CFRemoteObjectFactory class - enables you to connect to any ColdFusion flex gateway without using compiler arguments. Much easier, lighter and more maintainable.
/*
// EXAMPLE USAGE
// copy this file to com/util/CFRemoteObjectFactory.as
import com.util.CFRemoteObjectFactory;
import mx.controls.Alert;
import mx.events.FlexEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
@ryanguill
ryanguill / centos-install-instructions.md
Last active December 14, 2015 21:09
Installation instructions for CentOS 6.3 into virtual box, along with python 2.7, rabbitmq, redis and postgresql.Sets up samba, iptables and shows you how to create OS level users. Also instructions for installing Adobe ColdFusion and Railo.

CentOS 6.x Install Instructions

####Preface

These are my own instructions that I have decided to document as I have gone along. I have put them out there in case others may find them useful, but I make no guarantees on their accuracy, or even if any of it is a good idea! I am no linux/rabbitmq/redis/postgres/tomcat/etc expert, hence why I need these instructions. These are setups for what I needed at the time I wrote them, they may not be appropriate for you. If you have suggestions on how to improve any of this, or notice anything wrong, please let me know / fork the guide and make the changes.

When this guide was started Cent 6.3 was the latest version. I have since used the same instructions for 6.4 and 6.5 without issue. Just update any references to 6.3 to the latest version when you use this guide.

Be careful copying and pasting commands. Make sure before you do that none of the filenames or versions have changed since the guide was written. It is common for the

@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@jakemmarsh
jakemmarsh / binarySearchTree.py
Last active June 1, 2024 13:57
a simple implementation of a Binary Search Tree in Python
class Node:
def __init__(self, val):
self.val = val
self.leftChild = None
self.rightChild = None
def get(self):
return self.val
def set(self, val):
@ryanguill
ryanguill / pbkdf2.cfm
Last active June 21, 2018 15:29
PBKDF2 in CF: This is an example and test of hashing passwords in CFML using PBKDF2. Save this file as pbkdf2.cfm and run it for more information.
<cfscript>
struct function hashPasswordPBKDF2 (required string password, numeric iterations = 10000, numeric saltByteLength = 8) {
if (iterations < 100000) {
throw(message="Iterations must be greater than or equal to 100000");
}
if (saltbytelength < 8) {
throw(message="SaltByteLength must be greater than or equal to 8");
}
@pfmoore
pfmoore / factorio-recipe-parser.lua
Last active July 16, 2024 16:50
Parse the Factorio recipe files to create a CSV of recipes
data = {}
data["extend"] = function (data, t)
for n, recipe in ipairs(t) do
for i, component in ipairs(recipe["ingredients"]) do
cname = component[1] or component["name"]
camt = component[2] or component["amount"]
print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt)
end
end
end
@s-panferov
s-panferov / option.ts
Created November 30, 2014 12:15
Option and Result types from Rust in TypeScript
interface Option<T> {
map <U>(fn: (a: T) => U): Option<U>;
isSome(): boolean;
isNone(): boolean;
isSomeAnd(fn: (a: T) => boolean): boolean;
isNoneAnd(fn: () => boolean): boolean;
unwrap(): T;
unwrapOr(def: T): T;
unwrapOrElse(f: () => T): T;
map<U>(f: (a: T) => U): Option<U>;
@atuttle
atuttle / timezones.cfm
Last active November 19, 2022 03:23
Dealing with Time Zones in ColdFusion
<!---
Many thanks to Sean Corfield and Ryan Guill who set me down the correct path of java.util.TimeZone
--->
<cfscript>
writeDump(label="Conversion Examples",var={
"0-local-tz": getSystemTZ()
,"1-local-now": now()
,"2-utc-now": toUTC(now())
,"3-eastern-now": TZtoTZ( getSystemTZ(), now(), "America/New_York" )

Mark Ryan Guill

388 Dove Valley Road, Collierville, TN 38017
(901) 257-9264 / ryanguill@gmail.com

Summary of Qualifications

I have close to 20 years of professional software development experience designing, developing and maintaining applications across a wide range of systems for both small businesses and international corporations. Programming is my passion and my hobby and I am grateful to be able to do it full time. I specialize in developing complete system solutions, working with business experts and peers to deliver quality, maintainable software. I have a never-ending desire to grow, both learning new technologies and skills and expanding my business experience.