Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
use Symfony\Component\HttpFoundation\File\File; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
/** | |
* @Entity | |
*/ | |
class Document | |
{ |
<?php | |
class File_Streamer | |
{ | |
private $_fileName; | |
private $_contentLength; | |
private $_destination; | |
public function __construct() | |
{ | |
if (!isset($_SERVER['HTTP_X_FILE_NAME']) |
import sublime, sublime_plugin | |
import os, commands | |
import json, re | |
import pprint | |
""" TODO: | |
- have settings file with username/password/additional flags? | |
- options menu, per file/folder commands |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/usr/bin/php -q | |
<?php | |
#...//.../*...*/ | |
/* develop: Alexey Kovalev | |
e-mail: [email protected] */ | |
# --- GLOBAL VARIABLES --------------------------------------------------------- | |
# string error prefix & message | |
$str_errorPrx = "[ php.error ] "; | |
$str_errorMsg = ""; |
RDBMS-based job queues have been criticized recently for being unable to handle heavy loads. And they deserve it, to some extent, because the queries used to safely lock a job have been pretty hairy. SELECT FOR UPDATE followed by an UPDATE works fine at first, but then you add more workers, and each is trying to SELECT FOR UPDATE the same row (and maybe throwing NOWAIT in there, then catching the errors and retrying), and things slow down.
On top of that, they have to actually update the row to mark it as locked, so the rest of your workers are sitting there waiting while one of them propagates its lock to disk (and the disks of however many servers you're replicating to). QueueClassic got some mileage out of the novel idea of randomly picking a row near the front of the queue to lock, but I can't still seem to get more than an an extra few hundred jobs per second out of it under heavy load.
So, many developers have started going straight t
{url:'stun:stun01.sipphone.com'}, | |
{url:'stun:stun.ekiga.net'}, | |
{url:'stun:stun.fwdnet.net'}, | |
{url:'stun:stun.ideasip.com'}, | |
{url:'stun:stun.iptel.org'}, | |
{url:'stun:stun.rixtelecom.se'}, | |
{url:'stun:stun.schlund.de'}, | |
{url:'stun:stun.l.google.com:19302'}, | |
{url:'stun:stun1.l.google.com:19302'}, | |
{url:'stun:stun2.l.google.com:19302'}, |