This file contains 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 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
import Cocoa | |
class A { | |
var foo : () -> String | |
var baz : Int | |
init () { | |
func _foo () -> String { | |
return "halo" | |
} |
This file contains 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
var path = require("path"); | |
var gulp = require("gulp"); | |
var less = require("gulp-less"); | |
var notify = require("gulp-notify"); | |
var rename = require("gulp-rename"); | |
var minifyCSS = require("gulp-minify-css"); | |
var uglify = require("gulp-uglifyjs"); | |
var livereload = require("gulp-livereload"); | |
var source = require("vinyl-source-stream"); |
This file contains 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
#!/bin/bash | |
# virtualenv-auto-activate.bash | |
# | |
# Installation: | |
# Add this line to your .bashrc or .bash-profile: | |
# | |
# source /path/to/virtualenv-auto-activate.bash | |
# | |
# Go to your project folder, run "virtualenv .venv", so your project folder | |
# has a .venv folder at the top level, next to your version control directory. |
This file contains 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
use std::fs::File; | |
use std::io::BufRead; | |
use std::io::BufReader; | |
use std::path::Path; | |
struct Hit { | |
ip: String, | |
datetime: String, |
This file contains 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 | |
namespace app\controllers; | |
use lithium\net\http\Router; | |
use lithium\storage\Session; | |
use li3_oauth\models\Consumer; | |
class WeiboController extends \lithium\action\Controller { |
This file contains 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
# -------------------------------------------------------------------------------------- | |
# Download all pdf/ppt/pptx/zip/doc/odp files in page. | |
# | |
# Usage: | |
# xxx@xxx:~$ wget_slides http://velocityconf.com/velocity2010/public/schedule/proceedings | |
# Download all velocity 2010 slides. | |
# -------------------------------------------------------------------------------------- | |
function wget_slides () { | |
curl -sX GET "$1" | grep -or 'http:\/\/[^\"]\+\.\(pdf\|pptx\?\|zip\|doc\|odp\)' | awk '{print "\""$0"\""}' | xargs wget |
This file contains 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
for f in `curl -s http://www.qconbeijing.com/schedule.html | grep -oe '\"[^\"]\+\.\(pdf\|rar\|zip\|ppt\|pptx\|odt\|doc\|docs\)' | cut -d\" -f2`; do wget http://www.qconbeijing.com/$f; done |
This file contains 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 | |
namespace path\to\lib; | |
use BadMethodCallException; | |
use lithium\core\Libraries; | |
use lithium\util\Inflector; | |
/** | |
* This class can extend either \lithium\data\entity\Record or \lithium\data\entity\Document |
This file contains 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 | |
# ---------------------------------------------------------------------------- | |
# | |
# Test under 64-bit Debian Squeeze | |
# | |
# Thanks follow up posts: | |
# | |
# - Ruby 1.8.2 and Checkinstall 1.6.0: | |
# http://checkinstall.izto.org/cklist/msg00770.html |
OlderNewer