Skip to content

Instantly share code, notes, and snippets.

@markwu
markwu / bootstrap-plugins.txt
Created September 17, 2012 17:43 — forked from mklabs/bootstrap-plugins.txt
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@markwu
markwu / NullObject.php
Created November 18, 2012 09:13
PHP: Universal Null Object
<?php
/**
* Universal NULL object.
*
* Will throw no error messages so can be used as universal parameter.
* Does overwrite all available magic methods used in PHP5.3.
*
* @author Julius Beckmann
*/
@markwu
markwu / response.php
Created November 19, 2012 14:03 — forked from Sentences/response.php
Laravel Response extend for inline displaying of images
<?php
use Laravel\File;
/**
* Put this in laravels libraries dir and make sure to
* remove Response in /config/application.php
* This file will be autoloaded by default.
*
* @author Nico R <lt500r@gmail.com>
*/
class Response extends \Laravel\Response

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.

<?php
/**
* Created by: Mr McManDude
* Date: 2/22/13
*/
/**
* Class GCrypt
*/
class GCrypt
<?php
function runMigration() {
foreach (getUsers() as $user) {
$hash = $user->hash;
list ($oldhash, $oldsalt) = explode(':', $hash, 2);
$newHash = password_migrate_create($oldhash, $oldsalt, PASSWORD_BCRYPT);
$user->hash = $newHash;
saveUser($user);
}
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install lua lua-devel
yum install ruby ruby-devel
yum install python python-devel
yum install perl perl-devel
@blue: #049cdb;
Bootstrap 2Bootstrap 3
@black: #000;
@grayDarker: #222;@gray-darker: lighten(#000, 13.5%); // #222
@grayDark: #333;@gray-dark: lighten(#000, 20%); // #333
@gray: #555;@gray: lighten(#000, 33.5%); // #555
@grayLight: #999;@gray-light: lighten(#000, 60%); // #999
@grayLighter: #eee;@gray-lighter: lighten(#000, 93.5%); // #eee
@white: #fff;
@markwu
markwu / .vimrc
Created December 17, 2013 08:49 — forked from tom--/.vimrc
vmap <leader>s <esc>:'<,'> !php -r 'echo serialize(eval("return " . file_get_contents("php://stdin") . ";"));'<CR>
vmap <leader>u <esc>:'<,'> !php -r 'var_export(unserialize(file_get_contents("php://stdin")));'<CR>
#!/usr/bin/env bash
# Upgrade Base Packages
sudo apt-get update
sudo apt-get upgrade -y
# Install Web Packages
sudo apt-get install -y build-essential dkms re2c apache2 php5 php5-dev php-pear php5-xdebug php5-apcu php5-json php5-sqlite \
php5-mysql php5-pgsql php5-gd curl php5-curl memcached php5-memcached libmcrypt4 php5-mcrypt postgresql redis-server beanstalkd \
openssh-server git vim python2.7-dev