But original post can not access anymore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
class SmokeTestingController extends \BaseController | |
{ | |
public function upload() | |
{ | |
$iniMax = strtolower(ini_get('upload_max_filesize')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
class dict2obj(dict): | |
def __init__(self, d, default=None): | |
self.__d = d | |
self.__default = default | |
super(self.__class__, self).__init__(d) | |
def __getattr__(self, k): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
def retriable(retry_counts=3, before_retry=None, final=None, noexc=False): | |
is_callable = lambda x: x is not None and hasattr(x, "__call__") | |
if not is_callable(before_retry): | |
before_retry = lambda err, c: c | |
if not is_callable(final): | |
final = lambda err, c: c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
from contextlib import contextmanager | |
# | |
# Helpers | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
import sys | |
import logging | |
logging.basicConfig(level=logging.DEBUG, | |
stream=sys.stdout) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git clone -q git://github.com/shibukawa/lightpng.git | |
pushd lightpng | |
wget -nv "http://nchc.dl.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.tar.bz2" | |
tar xjf boost_1_53_0.tar.bz2 | |
git submodule update --init | |
which scons || sudo brew install scons | |
./build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
from itertools import imap | |
from functools import partial | |
import types | |
""" | |
Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias vmlive="VBoxManage list runningvms" | |
function vmstart () { | |
if [ -e $1 ]; then | |
echo 'No VirualMachine specified. All available machines:' | |
VBoxManage list vms | cut -d'"' -f2 | sed -E 's/(.*)/> \1/' | |
return | |
fi | |
local _EXISTS=`VBoxManage list vms | grep $1 | wc -l | awk '{print $1}'` | |
if [ ! $_EXISTS -eq 1 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
from simplejson import loads | |
from simplejson.decoder import JSONDecodeError | |
from betterprint import pprint | |
from os import path | |
if __name__ == '__main__': |