Skip to content

Instantly share code, notes, and snippets.

View alexef's full-sized avatar
🎯
Focusing

Alex Eftimie alexef

🎯
Focusing
View GitHub Profile
@alexef
alexef / gist:9486364
Created March 11, 2014 14:08
Readme.rst template

Life's Project

Project Name

Prerequisites - System packages

@knyar
knyar / statsd.lua
Created February 9, 2014 19:59
statsd interface for nginx (via ngx_lua)
-- ----------------------------------------------------------------------------
-- statsd interface for nginx
-- (c) 2014 Anton Tolchanov
-- https://gist.github.com/knyar/8905045
--
-- Usage:
-- 1. install nginx with ngx_lua;
-- 2. put this file as statsd.lua somewhere (/var/lib/nginx/lua/ will do);
-- 3. initialize stats in init_by_lua:
-- http {
// ==UserScript==
// @name 9gag.tv on chromecast
// @namespace http://tiago.dalligna.co.uk/
// @version 0.1
// @description watch 9gag.tv in chromecast
// @match http://9gag.tv/v/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @copyright 2013 Tiago
// ==/UserScript==
@mgax
mgax / vm-dev-setup.md
Last active December 31, 2015 19:59
Development VM setup

Rationale

This setup aims to create a clean development environment, by keeping development tools and libraries in a virtual machine, separate from the host computer. Separation has several advantages: you can back up the virtual machine, move it to a different host, keep multiple environments around (e.g. for wokring on projects with wildly different dependencies, or upgrading the development toolchain without risking downtime), and base the development environment on a different OS (hello Linux!). Last but not least, it keeps the host machine clean.

The downside is that you're running code inside a VM. You need to log in (we'll use SSH), make sure the code is available and in sync (we'll set up NFS). There's also some I/O overhead, and you need to decide on how much memory, CPU and disk space you allocate to the VM. You can change your mind later, but it's a bit of a hassle to resize virtual disks and partitions.

Set up the VM

We assume you're running MacOS and have VMware Fusion already installed

@ihumanable
ihumanable / Excel.php
Last active February 6, 2024 06:24
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 {