Skip to content

Instantly share code, notes, and snippets.

View Technoboggle's full-sized avatar

Edward Finlayson Technoboggle

  • Devon, England
View GitHub Profile
@Technoboggle
Technoboggle / Excel.php
Created February 13, 2018 13:19 — forked from ihumanable/Excel.php
Simple Excel Writer in PHP
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @link https://gist.github.com/ihumanable/929039/edit
* @license Unlicensed
* @version 1.0
*/
class Excel {
@Technoboggle
Technoboggle / virtualbox-clone-fixed-to-dynamic.md
Created January 17, 2018 09:49 — forked from stormwild/virtualbox-clone-fixed-to-dynamic.md
VirtualBox clone fixed size vm to dynamic, resize dynamic vm, expand partition

http://brainwreckedtech.wordpress.com/2012/01/08/howto-convert-vdis-between-fixed-sized-and-dynamic-in-virtualbox/ http://www.webdesignblog.asia/software/linux-software/resize-virtualbox-disk-image-manipulate-vdi/#comment-474

While there is no way to actually switch a VDI between fixed-size and dynamic, you can clone the existing VDI into a new one with different settings with VBoxManage.

VBoxManage clonehd [old-VDI] [new-VDI] --variant Standard
VBoxManage clonehd [old-VDI] [new-VDI] --variant Fixed

If you want to expand the capacity of a VDI, you can do so with

@Technoboggle
Technoboggle / 1) Install
Last active January 16, 2018 17:53 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// Prerequisites - overkill I know but gets the job done!
$ sudo yum -y groupinstall 'Development Tools'
$ sudo yum -y install tcl wget zip unzip
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-4.0.6.tar.gz
$ tar xzvf redis-*.tar.gz
$ cd redis-*
$ make distclean
$ cd deps
@Technoboggle
Technoboggle / chooser.js
Created December 14, 2016 18:30 — forked from kentcdodds/chooser.js
JSHint Options Chooser
// Just paste this into the console on http://www.jshint.com/docs/options/
(function() {
var i, row, link, span, extraCol, checkbox, value;
var rows = document.querySelectorAll('table.options tr');
var links = document.querySelectorAll('table.options a');
// add checkboxes
for (var i = 0; i < rows.length; i++) {
row = rows[i];
@Technoboggle
Technoboggle / strong-passwords.php
Last active August 31, 2015 14:57 — forked from tylerhall/strong-passwords.php
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by
#!/bin/sh
# ./convert_ploop_to_simfs.sh VEID
# chmod +x convert_ploop_to_simfs.sh
rsync_options='-aHAX --progress --stats --numeric-ids --delete'
partition='vz'
if [ ! -e /etc/vz/conf/$1.conf ]; then
echo "Virtual server configuration file: /etc/vz/conf/$1.conf does not exist."
exit 1
fi
if [ ! -d /$partition/private/$1/root.hdd ]; then