Skip to content

Instantly share code, notes, and snippets.

View lupomontero's full-sized avatar

Lupo Montero lupomontero

View GitHub Profile
@lupomontero
lupomontero / gist:789732
Created January 21, 2011 14:30
PHPFrame_Plugin::preDispatch()
<?php
class SillyPlugin extends PHPFrame_Plugin
{
public function preDispatch()
{
var_dump($_SERVER["HTTP_REFERER"]);
exit;
}
}
<?php
// ... in some plugin method
$this->app()->session()->getClient()->redirect(
$request->header("Referer")
);
VOWS=./node_modules/vows/bin/vows
DOCCO=./node_modules/docco/bin/docco
JSLINT=./node_modules/jslint/bin/jslint.js
.PHONY: all
all: jslint runtests docs
jslint:
@echo "\nRunning jslint..."
$('#some-element').fetchTweets({
username: 'some-twitter-user'
});
#include <node.h>
namespace cpphello {
using v8::FunctionCallbackInfo;
using v8::Isolate;
using v8::Local;
using v8::Object;
using v8::String;
using v8::Value;
var cpphello = require('./cpphello');
cpphello.foo(); // hello world
var makeFunction = function () {
var foo = true;
return function () {
return foo;
};
};
var myFunc = makeFunction();
myFunc(); // true
foo('bar', function () {
//...
});
function () {
//...
}();
(function () {
//...
}());