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 | |
class UserController extends \BaseController { | |
public function getLogin() { | |
return 'I\'m in!'; | |
} | |
} |
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
function fish_prompt | |
set last_command_status $status | |
echo "" | |
set_color red | |
echo -n "date:" | |
set_color normal | |
echo -n " " | |
echo -n " " |
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
sudo add-apt-repository -y ppa:ondrej/php5 | |
sudo add-apt-repository -y ppa:ondrej/mysql | |
sudo aptitude -y update | |
sudo aptitude -y install apache2-mpm-prefork | |
sudo aptitude -y install \ | |
libapache2-mod-php5 \ | |
php-apc \ | |
php-pear \ | |
php5-cli \ | |
php5-common \ |
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
if (! Function.prototype.bind) { | |
Function.prototype.bind = function bind(context_this) { | |
if (Object.prototype.toString.call(this) === "[object Function]") { | |
var | |
arguments_trimmed = Array.prototype.slice.call(arguments, 1), | |
function_to_bind = this, | |
function_noop = function () {} | |
; | |
var function_bound = function () { |
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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
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
#include <stdio.h> | |
#include <string.h> | |
#define INT_OR_STR_INT 1 | |
#define INT_OR_STR_STR 2 | |
typedef struct | |
{ | |
unsigned int type; | |
union |
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
#include <stdio.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int var_global = 0; | |
int main() | |
{ | |
int var_local = 0; | |
pid_t process_id_child = fork(); |
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
import java.io.IOException; | |
import java.io.StringReader; | |
import java.io.StringWriter; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.dojotoolkit.json.JSONParser; | |
import org.dojotoolkit.json.JSONSerializer; | |
import org.dojotoolkit.rt.v8.V8Exception; | |
import org.dojotoolkit.rt.v8.V8JavaBridge; |
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
#include <cctype> | |
#include <iostream> | |
class Person | |
{ | |
public: | |
std::string getNameFirst(); | |
std::string getNameLast(); | |
void setNameFirst( std::string value ); | |
void setNameLast( std::string value ); |