Skip to content

Instantly share code, notes, and snippets.

View ThePixelDeveloper's full-sized avatar

Mathew Davies ThePixelDeveloper

View GitHub Profile
@ThePixelDeveloper
ThePixelDeveloper / .zshrc
Created September 14, 2015 09:34
Antigen configuration
source ~/antigen/antigen.zsh
# Load colours
autoload -U colors && colors
# Parse prompt string
setopt promptsubst
antigen use oh-my-zsh
antigen bundle git
@ThePixelDeveloper
ThePixelDeveloper / selenium.bash
Created June 11, 2013 15:55
init.d file for selenium
#!/bin/bash
### BEGIN INIT INFO
# Provides: selenium
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start selenium at boot time
# Description: Enable service provided by selenium.
### END INIT INFO
file { 'create sasl_passwd':
ensure => present,
owner => root,
group => root,
path => '/etc/postfix/sasl_passwd',
source => 'puppet:///modules/postfix/sasl_passwd',
require => Package['postfix'],
} ->
exec { 'postmap hash:/etc/postfix/sasl_passwd':
@ThePixelDeveloper
ThePixelDeveloper / ni.bash
Created January 15, 2013 11:01
No internet command
#!/bin/bash
COMMAND="$1"
shift
for arg; do
COMMAND="$COMMAND \"$arg\""
done
sg no-internet "$COMMAND"
@ThePixelDeveloper
ThePixelDeveloper / UsersCommand.php
Created December 9, 2012 16:33
Generating 15,000 fake users for local development
<?php
namespace Nolimits\Dummy\Commands;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@ThePixelDeveloper
ThePixelDeveloper / PKGBUILD.txt
Created January 5, 2012 13:33
AUR - chromedriver
# Maintainer: grimsock <lord.grimsock at gmail dot com>
pkgname=chromedriver
pkgver=18.0.995.0
pkgrel=1
pkgdesc="ChromeDriver is a standalone server which implements WebDriver's wire protocol"
arch=('i686' 'x86_64')
url="http://code.google.com/p/selenium/wiki/ChromeDriver"
license=('Apache')
depends=('chromium>=12.0.712.0' 'libpng12')
arg: 5.3.0
Source directory does not exist; trying to extract
php-5.3.0
php-5.3.0/ext
php-5.3.0/ext/gd
php-5.3.0/ext/gd/gd.c
php-5.3.0/ext/gd/gd_ctx.c
php-5.3.0/ext/gd/libgd
php-5.3.0/ext/gd/libgd/gd.c
php-5.3.0/ext/gd/libgd/gd.h
<?php
/**
* The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
$application = '';
/**
<phpunit colors="true" bootstrap="../../application/test_bootstrap.php">
<testsuites>
<testsuite name="Exchange">
<directory suffix=".php">tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./classes/policy</directory>
</whitelist>
<?php defined('SYSPATH') or die('No direct script access.');
class Model_Day extends ORM {
protected $_table_columns = array(
'day' => array('data_type' => 'date', 'is_nullable' => FALSE),
'max_events' => array('data_type' => 'int', 'is_nullable' => FALSE, 'default' => 10),
);
protected $_primary_key = 'day';
protected $_has_many = array(
'event_start_day' => array('model' => 'event', 'far_key' => 'starting_day'),