Skip to content

Instantly share code, notes, and snippets.

require 'formula'
class Codetools < Formula
homepage "http://jlyonsmith.github.io/CodeTools/"
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/CodeTools-3.0.10708.tar.gz"
sha1 "32e70ffdd931fa6b3928d50b04d3e567ec37f471"
def install
mono_path = `/usr/bin/which mono`.strip
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil
require 'formula'
class Soapbox < Formula
homepage "http://github.com/jlyonsmith/Soapbox"
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/Soapbox-1.0.20302.tar.gz"
sha1 "b146ce78122a19ec104e9bf6be73fd0c1ef9acd4"
def install
mono_path = `/usr/bin/which mono`.strip
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil
require 'formula'
class Vacuum < Formula
homepage "http://github.com/jlyonsmith/Vacuum"
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/Vacuum-3.0.20307.tar.gz"
sha1 "e24bc5621753fbee9166e4dc2bf5dcc9ee426016"
def install
mono_path = `/usr/bin/which mono`.strip
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil
@jlyonsmith
jlyonsmith / IRequiresRequestStream_Service.cs
Last active February 13, 2019 17:05
Using IRequiresRequestStream with ServiceStack
using System;
using Mono.Unix;
using Mono.Unix.Native;
using System.Configuration;
using ServiceStack;
using ServiceStack.Web;
using System.IO;
using ServiceStack.Host.HttpListener;
using System.Net;
@jlyonsmith
jlyonsmith / RedisCacheClient.cs
Created August 19, 2014 09:59
ICacheClient for ServiceStack using StackExchange.Redis
using System;
using System.Collections.Generic;
using ServiceStack.Caching;
using StackExchange.Redis;
using ServiceStack.Text;
using System.Linq;
namespace Shared.ServiceInterface
{
public class RedisCacheClient : ICacheClient, IRemoveByPattern
@jlyonsmith
jlyonsmith / toaster.rb
Created April 8, 2014 06:41
Homebrew formula for Toaster unit test tools
require 'formula'
class Csharptools < Formula
homepage "http://jlyonsmith.github.io/Toaster/"
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/Toaster-2.0.20407.tar.gz"
sha1 "aeadb20cf4cfbf9886a2d60c30c4b883fcd5196a"
def install
mono_path = `/usr/bin/which mono`.strip
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil
@jlyonsmith
jlyonsmith / IAM_Backup_User_Policy.json
Last active September 24, 2016 22:43
Script and support files for backing up Redmine database to AWS S3 bucket. Replace 'xxx' with correct values.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::xxx-redmine-backups"
@jlyonsmith
jlyonsmith / S3Helper.cs
Created February 11, 2014 04:33
S3Helper
using System;
using System.Net;
using System.Net.Http;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using ToolBelt;
using System.IO;
@jlyonsmith
jlyonsmith / ExpandoObjectHelper.cs
Last active August 29, 2015 13:56
ExpandoObjectHelper
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Xml.Linq;
namespace ToolBelt.Dynamic
{
//
// This class came from http://www.codeproject.com/Articles/461677/Creating-a-dynamic-object-from-XML-using-ExpandoOb
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Post Ex-Dividend Profit on Single Share" />
<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['corechart']});
</script>
<meta charset=utf-8 />
<title>JS Bin</title>