Skip to content

Instantly share code, notes, and snippets.

@kerin
kerin / kubernetes_deis_local.md
Last active March 15, 2017 21:52
Local Kubernetes/Deis environment
{
"id": 34,
"meta": {
"type": "pages.SimplePage",
"detail_url": "http://localhost/api/v1/pages/34/"
},
"parent": {
"id": 3,
"meta": {
"type": "home.HomePage",
@kerin
kerin / fake API.json
Last active September 27, 2016 08:47
{
"layout": "content-sidebar-first",
"title": "Rashes in babies and children",
"top": [
{
"type": "markdown",
"content": "## Check if it's head lice"
},
{
Zone Type Days_of_operation Hours_of_operation Max_stay No_return Notes Spaces_approx Street X Y
B Permit holders only Mon - Sat 0830 - 1830 11 ELM GROVE 533969.9578 176433.4857
B Permit holders only Mon - Sat 0830 - 1830 11 ELM GROVE 533972.8683 176399.4054
B Permit holders or paid (phone or cash) Mon - Sat 0830 - 1830 240 8 STERNHALL LANE 534360.5923 175956.5522
B Disabled (short stay) Mon - Sun At any time 240 1 STERNHALL LANE 534338.6604 175949.9641
J Disabled Mon - Sun At any time 3 LORRIMORE ROAD 532037.67 177875.223
J Permit holders only Mon - Fri 0830 - 1830 3 LORRIMORE ROAD 532031.3295 177870.4944
J Permit holders only Mon - Fri 0830 - 1830 3 LORRIMORE ROAD 532045.7007 177881.4412
Motorcycle Mon - Sun At any time 0 532249.197 177939.3546
C2 Permit holders only Mon - Fri 0830 - 1830 2 HAYLES STREET 531729.7582 179111.1692
@kerin
kerin / auth0_login.html
Created January 28, 2016 16:00
auth0 login
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8" lang=""><![endif]-->
<!--[if gt IE 8]><!--><html lang=""><!--<![endif]-->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title> Login
</title>
for message in messages:
# lol?
body = json.loads(json.loads(message.body)['Message'])
self.process_message(body, message)
router.get('/login', function(req, res, next){
passport.authenticate('auth0', {
state: req.query.target
}, function(req, res){
res.redirect(req.query.state)
})(req, res, next);
});
@kerin
kerin / docx-to-md-html-txt.sh
Created September 30, 2015 10:06
simple bash script to convert .docx to .md, .html and .txt with pandoc
#!/usr/bin/env bash
find $1 -type f -name "*.docx" -print0 | while IFS= read -r -d $'\0' FNAME; do
BNAME=$(basename "$FNAME" .docx)
DNAME=$(dirname "$FNAME")
echo "$FNAME"
pandoc -t commonmark -o "$DNAME/$BNAME.md" "$FNAME"
pandoc -t html -o "$DNAME/$BNAME.html" "$FNAME"
pandoc -t plain -o "$DNAME/$BNAME.txt" "$FNAME"
@kerin
kerin / sql-server-export.ps1
Created September 30, 2015 10:03
powershell script for exporting SQL Server DBs as CSV files
$server = "IE11WIN7\SQLEXPRESS"
$tablequery = "SELECT name from sys.tables"
$databases = @(
"AdjudicationPanel",
"Ossc",
"Osscahmlr",
"ASADJ",
"CARESTANDARDS",
"CICAP",
Summer Budget - what a shower! Chris Bryce, CEO of IPSE
Independent professionals from the Isle of Skye to the Isle of Wight woke up
this morning (9 July) feeling they have been mugged following the summer budget.
The Chancellor has greatly disappointed us by listening to the army of faceless
wonders in HMRC and threatening contractors throughout the UK.
If you work through your own limited company things are going to get tougher,
much tougher.