Skip to content

Instantly share code, notes, and snippets.

View itavero's full-sized avatar
🤓

Arno Moonen itavero

🤓
View GitHub Profile
@itavero
itavero / git_export.sh
Last active December 14, 2015 19:18
Bash script to export the current branch/rev of a Git repository as a ZIP archive.
#!/bin/bash
# Easy Git Export Command
# Copyright (C) 2013, Arno Moonen <info@arnom.nl>
#
# Example usage (from within a Git repository, when using the alias):
# git-export ~/Desktop
# -> Creates the exported archive on your desktop.
# git-export
# -> Creates the exported archive one level up in your path.
#
@itavero
itavero / headless_pi.sh
Created November 27, 2015 13:06
Remove all of the graphical stuff from Raspbian
#!/usr/bin/env
# Still a work in progress...
sudo apt-get remove -y --auto-remove --purge libx11-*
sudo apt-get autoremove -y --purge
# Run raspi config to disable boot via GUI
sudo raspi-config
@itavero
itavero / form_div_layout.html.twig
Created May 9, 2012 11:00
Workaround for the "Unable to choose translation" problem when using the Form component, Validation component, Translation component and Twig. (keywords: Symfony, Silex)
{% extends 'Form/form_div_layout.html.twig' %}
{#
Extends from Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
Overrides the form_errors block so it no longer uses transchoice (which
was causing a problem).
#}
{% block form_errors %}
{% spaceless %}
@itavero
itavero / am_get_real_ip.php
Created December 23, 2011 09:38
Get the real IP address of the client and optionally also the one from the proxy server.
<?php
/**
* Get the IP address of the client.
*
* @author Arno Moonen <info@arnom.nl>
* @version 0.1-201112231035
* @param boolean $get_all Set to true to get an array containing all the IP addresses found.
* @return mixed Depending on the value of $get_all the return value will be either a string or an array
*/