Skip to content

Instantly share code, notes, and snippets.

Avatar
🇿🇦
Always learning..

Carl J du Preez carljdp

🇿🇦
Always learning..
View GitHub Profile
@carljdp
carljdp / clean-host.sh
Last active Apr 23, 2018
Docker Installation Scripts
View clean-host.sh
#!/bin/bash
# Removes all Docker cintainers, images, and Docker itself.
# see http://blog.baudson.de/blog/stop-and-remove-all-docker-containers-and-images
echo "Removing all containers and images.."
sudo docker stop $(sudo docker ps -aq)
sudo docker rm $(sudo docker ps -aq)
sudo docker rmi $(sudo docker images -q)
@carljdp
carljdp / meteorDevHelpers.js
Created Feb 13, 2018
Get Meteor server URL/IP when serving or testing from localhost
View meteorDevHelpers.js
import { Meteor } from 'meteor/meteor';
import os from 'os';
// If this were production env var ROOT_URL would have had a value
let rootUrl = Meteor.absoluteUrl();
if ((Meteor.isDevelopment) && (rootUrl === 'http://localhost:3000/')) {
rootUrl = _getServerUrlFromOs();
}
function _getServerUrlFromOs() {
@carljdp
carljdp / Android Tools for Meteor.md
Last active May 15, 2019
Installing Android Tools for Meteor
View Android Tools for Meteor.md
@carljdp
carljdp / JS Snippets
Last active Nov 17, 2017
Revive Adserver Tests
View JS Snippets
Profile Sponsor snippet: Oversized on purpose to observe behaviour
<!-- Revive Adserver Asynchronous JS Tag - Generated with Revive Adserver v4.1.1 -->
<ins data-revive-zoneid="5" data-revive-id="0d09779faf0e727ed2fa5a8af943194d"></ins>
<script async src="//ads.ultimateaim.co.za/www/delivery/asyncjs.php"></script>
// Revive Adserver Asynchronous JS Tag - Generated with Revive Adserver v4.1.1
ins(data-revive-zoneid='5', data-revive-id='0d09779faf0e727ed2fa5a8af943194d')
script(async='', src='//ads.ultimateaim.co.za/www/delivery/asyncjs.php')
@carljdp
carljdp / D1 Mini ESP8266.md
Last active Apr 4, 2022
Getting started with the D1 mini (ESP8266)
View D1 Mini ESP8266.md

D1 Mini (ESP8266)

Wesmos D1 Mini

1. Getting Started

1.1. Install the IDE:

In any web browser:

  • From the Arduino website, download & install the latest Arduino IDE (v1.8 or later). Available for Windows, Mac, Linux & ARM.

1.2. Add the ESP8266 module libraries: