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 | |
// apc crashed on my dev box, so overload the methods if they don't exist | |
if (!function_exists('apc_fetch')) { | |
function apc_fetch($key, &$success) { | |
if (!($filename = apc_get_tmpfile($key, $f))) { | |
return false; | |
} | |
if (!($d = fread($f, filesize($filename)))) { |
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 Traverse implements ArrayAccess { | |
protected $container; | |
function __construct($array) { | |
$this->container = $array; | |
} | |
public function offsetExists($offset) { | |
return isset($this->container[$offset]); | |
} |
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
#!/bin/bash | |
FAILURE=0 | |
do_tasks() { | |
if [[ $FAILURE -eq 0 ]]; then | |
echo -e "Running tasks\n" | |
some_command & | |
some_command & | |
some_command & |
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 HTTP { | |
protected _statusCode; | |
protected function _getStatusCode() { | |
return $this._statusCode; | |
} | |
protected _url; | |
protected function _getUrl() { |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Net; | |
using System.IO; | |
using System.Threading.Tasks; | |
using System.Runtime.Serialization; | |
using Newtonsoft.Json; |
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 Result { | |
public $id; | |
public $foo = 'bar'; | |
function __construct() { | |
$this->id = rand(0,9999); | |
} | |
} |
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 | |
$words = file('/usr/share/dict/words'); | |
function generateBTree($input) { | |
$tree = []; | |
$p = $tree; | |
foreach($input as &$word) { | |
$word = trim($word); |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
</head> |
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
var queued = [], scrollTimeout, waitForQueueTimeout; | |
function queueMore() { | |
Array.prototype.filter.call(document.querySelectorAll('a.UFILikeLink[title*="Like this"]'), function(a) { | |
if (queued.indexOf(a) === -1) { | |
queued.push(a); | |
} | |
}); | |
} |
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
#define DURP <stdio.h> | |
#define DQRP static | |
#define DIRP int | |
#define DFRP main() | |
#define DVRP(X,Y) printf(X,Y) | |
#define DYRP(X) return X | |
#define DGRP { | |
#define DJRP } | |
#define DORP 0 | |
#define DNRP 1 |
OlderNewer