Skip to content

Instantly share code, notes, and snippets.

View anubisthejackle's full-sized avatar

Travis Weston anubisthejackle

View GitHub Profile
selectID: function(channel){
var id, nick, list = [];
if( typeof this.weights[ channel ] == 'undefined' || this.weights[ channel ].length < 1 ){
this.identities[ channel ] = this.nicks[ channel ][ Math.floor( Math.random() * this.nicks[ channel ].length ) ];
return;
}
for( nick in this.weights[ channel ] ){
@anubisthejackle
anubisthejackle / .gitignore
Created May 23, 2015 20:56
Git Ignore File for Developing Inside WordPress Git Repo
.gitignore
wp-config.php
.htaccess
wp-content/plugins/*
wp-content/themes/*
'signed_info' => -1,
'body' => array(
'display_name' => 'output',
'message' => $meta[1],
'type' => 'main',
'type' => 'string',
'dOT_QUEMTMOFATE_MASSION'] => array(
'libng',
),
'type' => 'string',
<?php
$a = null;
$start = microtime(true);
for($i = 0; $i < 1000000000; $i++){
if( !empty( $a ) ){}
}
$empty = microtime(true) - $start;
$start = microtime(true);
for($i = 0; $i < 1000000000; $i++){
<?php
use Illuminate\Support\Facades\Http;
use Tests\TestCase;
class HttpSeriesTest extends TestCase
{
public function testHttpRequestsInSequence() {
<?php
/**
* Plugin Name: Test All Filter
*/
add_filter('all', function(){
static $calls;
if(!$calls){
$calls = 0;
@anubisthejackle
anubisthejackle / phpunit.sh
Last active January 10, 2021 17:49
PHPUnit Polyfill to auto-detect the correct PHPUnit to use in any development environment
#!/bin/bash
# Check if there is a vendor/bin/ or vendor-bin/ directory that contains PHPUnit
if [ -f $PWD"/vendor/bin/phpunit" ]; then
echo "Using vendor/bin/phpunit..."
$PWD/vendor/bin/phpunit $@
exit 0
fi
if [ -f $PWD"/vendor/bin/simple-phpunit" ]; then