Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
<?php
namespace RugbyStatsMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
/**
* Class that uses basic perform function to process queued jobs.
*/
class CopyGroupHierarchy
{
/**
* Before processing, connect to correct instance of redis.
*/
public function __construct()
{
@arturo-c
arturo-c / redis_server
Last active December 19, 2015 00:58
Redis and Resque Server Setup for Ubuntu 12.04
sudo apt-get install make
sudo apt-get update
sudo apt-get install build-essential
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
sudo make install
sudo apt-get install rubygems
@arturo-c
arturo-c / AllPlayers_Post_Member
Created June 26, 2013 17:39
AllPlayers Member Post Data
{
"event_data" : {
"group" : {
"group_above" : Group above uuid (String),
"name" : Group title/name (String),
"organization_id" : Array of organization group uuids (Array),
"type" : Array of group types, i.e. Sports, Baseball (Array),
"uuid" : UUID of group (String)
},
"member" : {
@arturo-c
arturo-c / AllPlayers_group_payload
Last active December 19, 2015 00:29
The AllPlayers Group Post Payload
{
"event_data" : {
"group" : {
"group_above" : The group above uuid (string),
"name" : The name/title of the group (string),
"organization_id" : An array containing the list of organization uuids or upper level groups (array),
"type" : An array containing the type identifiers of the group, i.e. Sports, Baseball (array),
"uuid" : The uuid of the group (string)
},
"uuid" : The uuid of the user that created the group,
stdClass Object
(
[_id] => MongoId Object
(
[$id] => 5112c8865a8ac768090b979f
)
[sid] => 7826738
[nid] => 4194858
[submitted] => 1358982161
WD php: User warning: Unknown column 'spaces_og' in 'where clause' [error]
query: SELECT id, value FROM purl WHERE provider = spaces_og in _db_query() (line 169 of /mnt/apci/main/www/includes/database.mysqli.inc).
WD php: User warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1 [error]
query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in _db_query() (line 169 of /mnt/apci/main/www/includes/database.mysqli.inc).
WD php: User warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1 [error]
query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in _db_query() (line 169 of
@arturo-c
arturo-c / config.php
Created October 1, 2012 20:59
config file for usa rugby behat tests on travis.ci
<?php
$config = array(
'username' => 'root',
'password' => '',
'database' => 'usarugby',
'server' => '127.0.0.1',
'consumer_key' => '3Q88vpe2kjyyFJedJ9TNigKGZUtF5vCW',
'consumer_secret' => 'QcZLNL4yik83h6PPycbpMwcU5UapChat',
'auth_domain' => 'https://www.pdup.allplayers.com', // Optional
@arturo-c
arturo-c / gist:3813442
Created October 1, 2012 18:15
apache configs for behat tests on travis.ci
<Directory PATH>
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot PATH
ServerName 127.0.0.1
</VirtualHost>