This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"theme": "elegant" | |
}, | |
"basics": { | |
"name": "Christian Witts", | |
"label": "Director of DevOps @ Impact", | |
"picture": "", | |
"email": "[email protected]", | |
"phone": "+27724369170", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script to limit mongoDB memory usage. | |
# Author: TechPaste.Com | |
############################################ | |
export _arg="$1" | |
if [ -z "$_arg" ] | |
then | |
echo "Memory to Allocate is empty" | |
echo "Usage: ./mongodb_memory_limiter.sh 1536" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the first stage, for building things that will be required by the | |
# final stage (notably the binary) | |
FROM golang | |
# Copy in just the go.mod and go.sum files, and download the dependencies. By | |
# doing this before copying in the other dependencies, the Docker build cache | |
# can skip these steps so long as neither of these two files change. | |
COPY go.mod go.sum ./ | |
RUN go mod download |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Check for required utilities | |
if ! which bc > /dev/null | |
then | |
echo "bc was not found. Please install bc." | |
exit 1 | |
fi | |
if ! which dig > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
from datetime import datetime | |
import time | |
import os | |
def get_timestamp(): | |
return datetime.now().strftime("[%Y%m%d %H:%M:%S]") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright(c) 2018 Asit Dhal. | |
# Distributed under the MIT License (http://opensource.org/licenses/MIT) | |
# | |
LIGHT_BLUE='\033[1;34m' | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
INTERACTIVE="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# $ setenforce Permissive | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
import os | |
PORT = os.getenv("PORT", 8000) |
NewerOlder