Skip to content

Instantly share code, notes, and snippets.

View ChristianWitts's full-sized avatar
🦀
Off writing HCL or YAML 🙃

Christian Witts ChristianWitts

🦀
Off writing HCL or YAML 🙃
View GitHub Profile
@ChristianWitts
ChristianWitts / DevOps Primer.md
Last active December 18, 2018 10:30
A Brief List of Introductory Resources for Learning About DevOps

Keybase proof

I hereby claim:

  • I am ChristianWitts on github.
  • I am christianwitts (https://keybase.io/christianwitts) on keybase.
  • I have a public key whose fingerprint is EC75 D618 1FDC 7332 15F5 DDA4 A252 4449 6F44 44FA

To claim this, I am signing this object:

import json
import re
import sys
from urlparse import urlparse
from datetime import datetime
START_BLOCK = 'Running'

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@ChristianWitts
ChristianWitts / gist:aae3fde5ab76a1c4f6f6a4a03aa79f04
Created January 11, 2018 06:04
Paket .Net Core Bootstrap Testing
➜ enricosada git clone git@github.com:enricosada/paket-netcore-testing.git
Cloning into 'paket-netcore-testing'...
remote: Counting objects: 126, done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 126 (delta 44), reused 99 (delta 39), pack-reused 19
Receiving objects: 100% (126/126), 2.66 MiB | 239.00 KiB/s, done.
Resolving deltas: 100% (46/46), done.
➜ enricosada dotnet --version
2.1.2
➜ enricosada cd paket-netcore-testing
@ChristianWitts
ChristianWitts / svn2git.sh
Created January 17, 2018 08:47
Convert SVN Repository to Git
#!/usr/bin/env bash
set -eou pipefail
# Atlassian has a script to aid in some tasks [1]
# This is to create a case sensitive file-system specifically for macOS [2]
java -jar ~/svn-migration-scripts.jar create-disk-image 5 GitMigration
SVN_DOMAIN=""
# List the SVN Project Name and corresponding Git name 1-for-1
@ChristianWitts
ChristianWitts / serv.py
Created January 22, 2018 12:54
Quick simple
#!/usr/bin/env python
# $ setenforce Permissive
import SimpleHTTPServer
import SocketServer
import logging
import os
PORT = os.getenv("PORT", 8000)
@ChristianWitts
ChristianWitts / colour_count.py
Created January 22, 2018 14:57
Count the number of pixels in a certain RGB range
#!/usr/bin/env python
# Install OpenCV and numpy
# $ pip install opencv-python numpy
import cv2
import numpy as np
img = cv2.imread("bgr.png")
# minimum value of brown pixel in BGR order -> burleywood
@ChristianWitts
ChristianWitts / fetchkeys.js
Created February 2, 2018 06:31 — forked from voxpelli/fetchkeys.js
Check the ssh key length of specified users
// Replace this list with the result of to-run-on-org-page.js
// And remember to do an "npm install"
var users = ["voxpelli"];
var https = require('https');
var fs = require('fs');
var exec = require('child_process').exec;
var tmp = require('temporary-directory')
var cuid = require('cuid');
var chalk = require('chalk');
@ChristianWitts
ChristianWitts / rasterize.js
Created March 12, 2018 09:24
Generate a PDF from a URI with PhantomJS
var page = require('webpage').create(),
system = require('system'),
address, output, size;
if (system.args.length < 3 || system.args.length > 5) {
console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]');
console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"');
console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px');
console.log(' "800px*600px" window, clipped to 800x600');
phantom.exit(1);