Sandcastle

Recent Posts

Use ES6 in Gulpfile.js

published on
Gulp doesn’t natively support Ecma Script 6 (ES6), so in order to get it working we need to first transpile our gulpfile.js file before it can be read by gulp. A clean way of acheiving this is to have the default gulp file gulpfile.js that acts as a shim to load and transpile the ES6 version (in my case gulfile.es6.js). Babel has a neat hook into npm that allows us to automatically transpile required statements on the fly. Read More...

Automatic security updates with Ubuntu

published on
To configure automatic updates on Ubuntu you will first need ensure that the unattended-upgrades package is installed. sudo apt-get install unattended-upgrades We then need to enable the package by running the following command (you will be prompted with a confirmation screen - select yes): sudo dpkg-reconfigure -plow unattended-upgrades Once enabled, edit the auto upgrades settings file (/etc/apt/apt.conf.d/20auto-upgrades) so it contains the following 4 lines (some may already exist): APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::Unattended-Upgrade "1"; These settings will ensure that it checks for updates daily and runs a weekly cleanup. Read More...

How to convert a mercurial (hg) repository to git

published on
The easiest way to convert from mercurial (aka hg) to git is by using hg-fast-export on ubuntu. If you dont have ubnutu, then you can spin up a server on Digital Ocean for a few cents. If you have issues with any of the below commands, try prefixing with sudo to elevate privileges. Install git & mercurial First we need to install Git and Mercurial: sudo apt-get install git mercurial -y Clone hg-fast-export The hg-fast-export converter is run directly from its repo so we will need to clone it locally. Read More...

Categories

Design (1)

Development (5)

Interwebs (1)

Ops (1)

Tags

anti-patterns (1) code (3) dotnet (1) es6 (1) git (1) gulp (1) hg (1) html (1) http (1) linux (1) nginx (1) node (1) security (1) ubuntu (1) web (2)