Skip to content

Instantly share code, notes, and snippets.

♥️
Do not forget to love

Jérémy Romey jeremyFreeAgent

♥️
Do not forget to love
Block or report user

Report or block jeremyFreeAgent

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jeremyfreeagent on github.
  • I am jeremyfreeagent (https://keybase.io/jeremyfreeagent) on keybase.
  • I have a public key ASDAHBR5ZWzbZR3H4MYNZuGqUSfW4Lz9R2gIxJeQoxj2dwo

To claim this, I am signing this object:

@jeremyFreeAgent
jeremyFreeAgent / jolinotif.php
Last active Sep 17, 2015
jolicode/jolinotif example
View jolinotif.php
<?php
<<<CONFIG
packages:
- "jolicode/jolinotif: dev-master"
CONFIG;
use Joli\JoliNotif\Notification;
use Joli\JoliNotif\NotifierFactory;
$notifier = NotifierFactory::create();
View gist:4072795
-- Function: field(anyelement, anyarray)
-- DROP FUNCTION field(anyelement, anyarray);
CREATE OR REPLACE FUNCTION field(anyelement, anyarray)
RETURNS integer AS
$BODY$
SELECT
COALESCE((SELECT i
FROM generate_series(1, array_upper($2, 1)) gs(i)
View gist:3880114
<?php
$judy = new Judy(Judy::INT_TO_MIXED);
$ids = array(13003, 404, 13);
foreach ($ids as $id) {
$judy[$id] = new DateTime;
}
echo count($judy);
foreach ($judy as $id => $element) {
View gist:3852066
<?php
class Test implements ArrayAccess, Iterator
{
protected $container;
public function __construct()
{
$this->container = new Judy(Judy::INT_TO_MIXED);
}
@jeremyFreeAgent
jeremyFreeAgent / gist:1224221
Created Sep 17, 2011
sudo port install apache2
View gist:1224221
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_apache2/apache2/work/httpd-2.2.21" && /usr/bin/make -j2 -w all " returned error 2
View isGoingToCrashBecauseOfMemory
<?php
class faTask extends sfBaseTask
{
static private function getMemoryLimit()
{
return ini_get('memory_limit')*1024;
}
static private function getMemoryUsage()
{
View config.yml
parameters:
kernel.include_core_classes: false
kernel.config:
charset: UTF-8
error_handler_level: null
web.config: ~
web.templating:
View python_mysqldb
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.6-universal/egg/MySQLdb/__init__.py", line 19, in <module>
File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dynamic module does not define init function (init_mysql)
>>>
You can’t perform that action at this time.