Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Install and download the latest Version of IMSCP
LATEST_VERSION=$(curl -s https://github.com/i-MSCP/imscp/releases/latest|grep -Po '(?<=/tag/)[0-9.]+')
INSTALLED_VERSION=$(cat /etc/imscp/imscp.conf|grep -Po '(?<=Version = )[0-9.]+')
TARGET=/usr/local/src/
echo "installed imscp-version: $INSTALLED_VERSION"
@theemstra
theemstra / getquote.php
Created March 4, 2015 12:20
Getting Yahoo Finance quote printed
<!DOCTYPE html>
<?php
/*
* Copyright (C) 2015 Thom Heemstra <thom@heemstra.us>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
@theemstra
theemstra / gist:013b96d4460b9d1d6f7f
Created February 13, 2015 11:44
Dutch translation pop3fetcher (roundcubeplugins)
<?php
/*
+-----------------------------------------------------------------------+
| ./plugins/pop3fetcher/localization/nl_NL.inc |
| Language file of roundcube-pop3fetcher plugin |
| Copyright (C) 2010-2013, Paolo 'morepaolo' Moretti |
| Licensed under the GNU GPL |
| |
+-----------------------------------------------------------------------+
<?php
$randomValue = mt_rand();
$even = $randomValue & ~1;
$odd = $randomValue | 1;
// magical unicorn isn't it?

Remove white background color of an image in ImageMagick

$ convert  your.jpg  -transparent white  your.png

Flatten a transparent image with a white background:

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname