Skip to content

Instantly share code, notes, and snippets.

View albertvolkman's full-sized avatar

Albert Volkman albertvolkman

View GitHub Profile
@albertvolkman
albertvolkman / gist:8945381
Created February 11, 2014 22:17
Drupal Code Sniffer
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,js,txt,info .
@albertvolkman
albertvolkman / gist:9744340
Last active August 29, 2015 13:57
Example MondoDB schema
{
_id: '00e8da9b’,
name: 'Kidney Beans',
barcode: '99823883833',
stores: [ # Instances of this product.
{
_id: '98823d',
name: 'Publix',
qty: 30, # Quantity available within store.
price: 1200,
<?php
/**
* @file
* Contains AllPlayers\RestServer\Tests\Controller\Group\MemberControllerTest.
*/
namespace AllPlayers\RestServer\Tests\Controller\Group;
use AllPlayers\Tests\Selenium\Group\Registration\AdHocRegistrationTest;
use AllPlayers\Tests\Selenium\TestCase\TestCase;
@albertvolkman
albertvolkman / Rakefile
Last active August 29, 2015 14:03 — forked from arturo-c/Rakefile
require 'resque'
namespace :resque do
desc "Clear pending tasks"
task :clear do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."
Resque.redis.del "queue:#{queue_name}"
end
<body class=" hasGoogleVoiceExt"><object type="application/x-shockwave-flash" data="http://files.ghanalive.tv/secure-player/player.swf" width="650" height="500" bgcolor="#000000" id="mediaplayer" name="mediaplayer" tabindex="0"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="seamlesstabbing" value="true"><param name="wmode" value="opaque"><param name="flashvars" value="netstreambasepath=http%3A%2F%2Fwww.ghanalive.tv%2Ffifa-world-cup-2014%2F&amp;id=mediaplayer&amp;stretching=exactfit&amp;file=skylite%2Fams%2Fgtv-sports&amp;duration=0&amp;autostart=true&amp;streamer=rtmp%3A%2F%2Fskylite.pointcdn.net&amp;controlbar.position=bottom"></object>
</body>
<?php
/**
* Implements hook_drush_command().
*/
function imagestyles_drush_command() {
$items = array();
$items['imagestyles'] = array(
'callback' => 'imagestyles_drush_callback',
<?php
public function getAllUuids($exclude_users)
{
$this->uuidOnly = true;
$this->result = array();
if (!$this->filters(self::DATABASE_MONGO)) {
// Searches SQL without mongo.
$this->loadSQLData(true, true);
} else {
Array
(
[name] => Moto 360
[title] =>
[aka] =>
[logo] =>
[image] => File:Android Wear preview.jpg
[developer] => [[Motorola Mobility]]
[manufacturer] =>
[family] =>
@albertvolkman
albertvolkman / gist:06288f1315ed33d32e32
Created September 27, 2014 02:47
New Issue Template
&nbsp; | Detail
------------ | -------------
Browser | [ Chrome / Firefox / Internet Explorer / Netscape Navigator ]
OS | [ OSX / Windows / Linux ]
User |
URL |
Screenshot | ![Screenshot]( [screenshot] )
Notes |
/**
* Apply payment against order.
*
* @param string $order_uuid
* The order UUID.
* @param string $payment_method
* The pipe-delimited string representing the payment method.
* @param integer $amount
* The amount to apply to the order, without the decimal.
*/