Skip to content

Instantly share code, notes, and snippets.

@nburkley
nburkley / gist:d00fc3fc4d8445da0988
Created June 17, 2015 13:38
Adding Multi-domain SSL certs to Herkou

When adding a multi-domain certificat to Herkou, the standard certficate update/add command results in

$> herkou certs:update cert_bundle.pem server.crt server.key

Resolving trust chain... failed
 !    No certificate given is a domain name certificate.

To get this to work you need to add the --bypass parameter

@nburkley
nburkley / gist:2059c70686f2823e8566
Created March 18, 2015 10:33
Restore data only form heroku database dump
pg_restore --verbose --data-only --no-acl --no-owner -h localhost -U db_user -d db_name filename.dump
@nburkley
nburkley / designer.html
Created September 4, 2014 14:45
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu-button/core-menu-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
@nburkley
nburkley / gist:93b88b0732c6c8fbe78b
Last active August 29, 2015 14:04
Find 10 largest tables in DB
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;