Skip to content

Instantly share code, notes, and snippets.

@ashleyhindle
ashleyhindle / keybase.md
Created February 9, 2017 15:00
keybase.md

Keybase proof

I hereby claim:

  • I am ashleyhindle on github.
  • I am ashleyhindle (https://keybase.io/ashleyhindle) on keybase.
  • I have a public key ASC-vPbMTVXl653w0iBB2zj2u6a08n2pfMHdw2lAmKlkxwo

To claim this, I am signing this object:

@ashleyhindle
ashleyhindle / highlight
Created October 11, 2016 09:23
Highlights words piped through STDIN
#!/usr/bin/env php
<?php
if (empty($argv[1]) || strpos($argv[1], '-h') !== false) {
die('Pass highlights as arguments (case sensitive): echo "cheese is nice" | highlight cheese nice' . PHP_EOL);
}
// Lovingly borrowed from http://blog.lenss.nl/2012/05/adding-colors-to-php-cli-script-output/ SHOUTOUT
$colors = [
'green' => '0;32',
'yellow' => '1;33',
@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]"
@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 / 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 / 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)
});

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:

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
<?php
echo "500000 loops of \$foo = array('i' => \$i);\n";
$start = microtime(true);
for ($i=0; $i < 500000; $i++) {
$foo = array(
'i' => $i
);
}
<?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");