Skip to content

Instantly share code, notes, and snippets.

View brettfarrow's full-sized avatar

Brett Farrow brettfarrow

View GitHub Profile
@manarth
manarth / drupal killer contract.md
Created January 8, 2013 19:42
Drupal contract, based on Andy Clarke's Killer Contract: https://gist.github.com/4031343

Technical Consultancy Contract

Between us [company name] and you [customer name]

Summary

@mvsantos
mvsantos / remove-image-background.sh
Created May 10, 2013 14:16
Remove/strip image background - rough mode - requires ImageMagick
# Requires ImageMagick
# Converting the source from JPEG to PNG - if necessary
convert my_src_image.jpg my_src_image.png
# Option A
# - Requires a temporary intermediate file
# - Drill more than 10 might result in poor results
@harrisonde
harrisonde / gist:90431ed357cc93e12b51
Last active May 24, 2021 22:01
Deploy Laravel 5 applications on AWS Elastic Beanstalk
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk.
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config)
# -------------------------------- Commands ------------------------------------
# Use "commands" key to execute commands on the EC2 instance. The commands are
# processed in alphabetical order by name, and they run before the application
# and web server are set up and the application version file is extracted.
# ------------------------------------------------------------------------------
commands:
01updateComposer:
@imathis
imathis / clone.rb
Created August 17, 2015 03:10
Clone all repositories under a user or organization
#!/usr/bin/ruby
require 'open-uri'
require 'json'
user = 'imathis'
repos = open("https://api.github.com/users/#{user}/repos") { |f|
JSON.parse(f.readlines.join)
}
@avafloww
avafloww / PhpJava.java
Last active June 13, 2024 07:36
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();