Skip to content

Instantly share code, notes, and snippets.

@afawcett
afawcett / CustomPermissionsReader.cls
Last active July 10, 2020 02:04
CustomPermissionsReader
/**
* Copyright (c), Andrew Fawcett
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active February 25, 2026 23:00
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@brantfaircloth
brantfaircloth / ghost.sh
Last active May 20, 2020 09:20
CentOS init script for the ghost blogging platform
#!/bin/sh
#
# ghost - this script starts the ghost blogging package
#
# chkconfig: - 95 20
# description: ghost is a blogging platform built using javascript \
# and running on nodejs
#
# Source function library.
@hofmannsven
hofmannsven / README.md
Last active February 24, 2026 02:03
Git CLI Cheatsheet
@afawcett
afawcett / ant-salesforce.xml
Last active December 29, 2022 17:11
Defines some macros around sf:deploy to install and uninstall packages.
<!-- TODO: Review Ant v1.8 local properties -->
<project xmlns:sf="antlib:com.salesforce">
<!-- Download from Salesforce Tools page under Setup -->
<typedef
uri="antlib:com.salesforce"
resource="com/salesforce/antlib.xml"
classpath="${basedir}/lib/ant-salesforce.jar"/>
<!-- Download from http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ -->
@zachlendon
zachlendon / gist:5295365
Created April 2, 2013 19:22
Modified jasmine-ajax for ExtJs4
/*
Jasmine-Ajax : a set of helpers for testing AJAX requests under the Jasmine
BDD framework for JavaScript.
Supports both Prototype.js and jQuery.
https://github.com/pivotal/jasmine-ajax
Jasmine Home page: http://pivotal.github.com/jasmine
@aheld
aheld / jira_metrics.rb
Created June 12, 2012 19:01
JIRA API quick and dirty calculations
require 'pp'
require 'rubygems'
require 'open-uri'
require "uri"
require "net/http"
require 'openssl'
require 'json'
require 'digest/sha1'
@luckyphil
luckyphil / gist:2913388
Created June 11, 2012 23:22
When Spring Roo Addon support doesn't work, how to load and use osgi bundles
Had trouble getting addons loaded since upgrading to roo 1.2.2 – things that worked before like roo> git <tab><tab> prompting me to load the addon had stopped working.
The root cause of this is some issue with a piece called ROOBOT which has an xml file in a springsource repo that appears to be incomplete. It’s purpose is to track all the available addons so that we can search them and install them. When this failed, I started down the path of loading the bundles manually – well here is the abridged version.
1. Bundles are in an S3 (Amazon) repo – if you want to browse you need the s3 browser and an aws account.
2. If you know what you are trying to load its easy, but you need to load all the dependencies.
Example 1. Getting the GIT addon to work again in 1.2.2
osgi install --url http://spring-roo-repository.springsource.org/release/org/springframework/roo/wrapping/org.springframework.roo.wrapping.jsch/0.1.42.0010/org.springframework.roo.wrapping.jsch-0.1.42.0010.jar
@mmrwoods
mmrwoods / new_linode_centos6.markdown
Created February 7, 2012 11:39
Make me a new CentOS linode

Make me a new CentOS linode

Notes:

  • Instructions written for CentOS 6.3
  • Change, me, myhost, myip etc. to your username, hostname, ip address and so on.
  • Run all commands as root unless otherwise directed.
  • You might want to look at mounting /var and /home on separate partitions.
  • I've just allowed all members of the wheel group to operate as root. This is the height of laziness and highlights the fact that I'm just a developer that's stolen a sysadmin's