Skip to content

Instantly share code, notes, and snippets.

View trq's full-sized avatar

Tony R Quilkey trq

  • thorpesystems
  • Sydney, Australia
View GitHub Profile
SELECT * from vouchers v
WHERE v.name = "?"
AND (v.plan_type = "?" OR v.plan_type IS NULL)
<?php
function write_config($key, $value) {
require 'config.php';
$config[$key] = $value;
file_put_contents('config.php', "<?php\n\n" . var_export($config, true));
}

Keybase proof

I hereby claim:

  • I am trq on github.
  • I am trq (https://keybase.io/trq) on keybase.
  • I have a public key whose fingerprint is 3AAF 3A5E D969 174C 8F0D 63D9 99E0 98C4 EE5D 02BF

To claim this, I am signing this object:

<?php
$output = '';
SSH::run($commands, function($line) use (&$output)
{
$output .= $line;
});
echo $output;
<?php include 'login-register-header.php'; ?>
<h2>Your Profile</h2>
<p>Have your say, choose your avatar and more.</p>
<h3>Your Avatar</h3>
<?php
require 'connect.php';
var_dump($_SESSION['user']);
// Outputs the avatar based on the SQL entry
if(!empty($_SESSION['user'])){
<?php
class Foo
{
public $bar = 'bob';
}
class Whatever
{
public function __construct(Foo $foo)
@trq
trq / gist:9109189
Created February 20, 2014 08:30
Single Process Command
// src/Trq/FooBundle/Helper/SingleProcess.php
<?php
namespace Trq\FooBundle\Helper;
class SingleProcess
{
protected $callback;
protected $fp;
I need:
sudo bindfs --owner=vagrant --group=www-data --perms=u=rwX:g=rwX:o=r /.vagrant-storage /var/www/app/storage
to end up being:
sudo bindfs -o nonempty --owner=vagrant --group=www-data --perms=u=rwX:g=rwX:o=r /.vagrant-storage /var/www/app/storage
@trq
trq / todo.md
Last active January 1, 2016 23:59
test todo:

todo

  • something
  • something else
trq@oblivion[~/src/lr]+ bin/sculpin generate
[Twig_Error_Syntax]
Unexpected tag name "highlight" (expecting closing tag for the "block" tag defined near line 1) in "FileSource:FilesystemDataSource:/Users/trq/src/lr/source:bower_components/sa
ss-bootstrap/components.html" at line 816