Skip to content

Instantly share code, notes, and snippets.

View juniorplenty's full-sized avatar

Jason Bond Pratt juniorplenty

View GitHub Profile
@juniorplenty
juniorplenty / after.js
Last active August 29, 2015 14:11
gulp-angular-templatecache alternative
// This implementation eliminates the plugin, and breaks out the conversion-to-javascript (6 lines) and
// concat-into-template.js (3 lines)
// This way, the file is parsed by jade, converted to javascript, and then cached. The concat/header/footer
// workflow then takes all cached content and creates the final file.
// Enjoy.
var htmlJsStr = require('js-string-escape'); // used by templatecache internally
var cache = require('gulp-cached');
function buildTemplates(){
#!/bin/bash
SRCDB=honeydew_production
SRCTABLE=impressions
DSTDB=honeydew_archive_2012
DSTTABLE=impressions
SQL="alter table $DSTDB.$DSTTABLE disable keys"
echo "$SQL"
echo "$SQL" | mysql
SELECT CONCAT(FORMAT(DataPages*100.0/TotalPages,2),' %') BufferPoolDataPercentage FROM
(SELECT variable_value DataPages FROM information_schema.global_status
WHERE variable_name = 'Innodb_buffer_pool_pages_data') A,
(SELECT variable_value TotalPages FROM information_schema.global_status
WHERE variable_name = 'Innodb_buffer_pool_pages_total') B;