Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@rwjblue
rwjblue / s3-put.sh
Created October 28, 2013 19:21
Short bash script to upload to S3 with no dependencies sans stock openssl & curl. From: https://github.com/sstephenson/ruby-build/blob/4ed38ba4bceafa3f8908a05b58e6bcf219fbbdc3/script/s3-put
#!/usr/bin/env bash
# Usage: s3-put <FILE> <S3_BUCKET> [<CONTENT_TYPE>]
#
# Uploads a file to the Amazon S3 service.
#
# Depends on AWS credentials being set via env:
# - AMAZON_ACCESS_KEY_ID
# - AMAZON_SECRET_ACCESS_KEY
#
# Outputs the URL of the newly uploaded file.
@JonoB
JonoB / gist:6637861
Created September 20, 2013 13:49
Laravel Base Model
<?php namespace Tmb;
use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Validation\Validator;
class BaseModel extends Eloquent
{
/**
* Error message bag
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@sahanh
sahanh / newrelic.php
Last active December 14, 2015 07:28
A class to implement newrelic in laravel
<?php
class NewRelic
{
public static function __callStatic($method, $params)
{
if (!extension_loaded('newrelic')) {
return null;
}
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.