Skip to content

Instantly share code, notes, and snippets.

@ashleyhindle
ashleyhindle / Testies.php
Created February 21, 2011 13:01
Testies
<?php
echo "Why do you hate me so?";
$_life->end(false);
// BAh humbug
<?php
/*
* This file is part of the Silex framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
chdir('/home/ahindle/mycloud/bolt/');
use Bolt\Configuration\LowlevelException;
require_once 'app/lib.php';
require 'vendor/autoload.php';
$configuration = new Bolt\Configuration\Composer('/home/ahindle/mycloud/bolt/');
$configuration->setThemePath(["theme_path"=>"/public/theme", 'theme'=>'base-2014']);
$configuration->setPath("themebase","public/theme");
<?php
echo "500000 loops of \$foo = array('i' => \$i);\n";
$start = microtime(true);
for ($i=0; $i < 500000; $i++) {
$foo = array(
'i' => $i
);
}

All have the same bandwidth/guard intervals/QAM:

Inversion Bandwidth Fec Fec Qam Mode Guard Interval Hierarchy
INVERSION_AUTO BANDWIDTH_8_MHZ FEC_2_3 FEC_NONE QAM_64 TRANSMISSION_MODE_8K GUARD_INTERVAL_1_32 HIERARCHY_NONE
Channel Name Frequency Video PID Audio PID SID
Sky News 698000000 101 102 22080
Pick 698000000 301 302 22208

Keybase proof

I hereby claim:

  • I am theahindle on github.
  • I am theahindle (https://keybase.io/theahindle) on keybase.
  • I have a public key whose fingerprint is EC4F 3710 606B C319 6F6C B916 8E11 777E CB67 2E78

To claim this, I am signing this object:

@ashleyhindle
ashleyhindle / angular-factory.js
Created August 20, 2015 19:36
angular-factory.js
var app = angular.module('cheeseBurgerApp', ['ngStorage', 'ngCookies']);
app.factory('storageFactory', ['ngStorage', function($localStorage) {
return $localStorage.$default(config.defaultStorageObject);
}]);
app.controller('MainCtrl', ['storageFactory', function($storageFactory, $scope, $rootScope, $modal, $log, $cookies, $http) {
console.log($storageFactory.data)
});
@ashleyhindle
ashleyhindle / monitor-slave-status.sh
Created September 4, 2015 12:18
Monitor mysql slave status
#!/bin/bash
watch -n 0.5 "echo 'show slave status\G' | mysql -uslave --password=slave | grep -v 'Ignore\|SSL\|Auto_P\|Until\|Last_IO\|Gtid' | tee /tmp/slave-status; grep Behind /tmp/slave-status | awk -F: '{print \$2/3600\" hours behind\"}'"
@ashleyhindle
ashleyhindle / difference.txt
Last active September 10, 2015 21:04
Difference in columns mysql.user between 5.0.95 and 5.6.19
+------------------------+-----------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+-----------------------------------+------+-----+---------+-------+
| Event_priv | enum('N','Y') | NO | | N | |
| Trigger_priv | enum('N','Y') | NO | | N | |
| Create_tablespace_priv | enum('N','Y') | NO | | N | |
| plugin | char(64) | YES | | | |
| authentication_string | text | YES | | NULL | |
| password_expired | enum('N','Y') | NO | | N | |
+------------------------+-----------------------------------+------+-----+---------+-------+
@ashleyhindle
ashleyhindle / qif2csv.rb
Created September 10, 2015 19:50
qif2csv qif to csv xls
#!/usr/bin/ruby
# Usage:
# gem install qif
# ./qif2csv.rb [input.qif] [output.sv]
require 'qif'
require 'csv'
if ARGV.empty? || ARGV.length < 2
puts "Usage: ./qif2csv.rb [input.qif] [output.csv]"