Skip to content

Instantly share code, notes, and snippets.

@rlandas
rlandas / install_ffmpeg_ubuntu.sh
Created November 11, 2015 10:16 — forked from xdamman/install_ffmpeg_ubuntu.sh
UBUNTU Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@rlandas
rlandas / .htaccess
Last active August 29, 2015 14:22 — forked from ericmagnuson/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule (.*\.min.css) less.php?min=yes&path=$1
RewriteRule (.*\.css) less.php?min=no&path=$1
</IfModule>
@rlandas
rlandas / Makefile
Last active November 11, 2015 10:13 — forked from h4cc/Makefile
UBUNTU Install packages
#
# Ubuntu 14.04 LTS (Trusty Tahr)
#
# Basic packages i usually install
#
# Author: Julius Beckmann <github@h4cc.de>
#
.PHONY: all update upgrade graphics darktable networking google_chrome dropbox archives media pandoc system harddisk docker filesystem apache2 php mysql memcached mongodb tools encfs_manager nautilus httpie erlang elixir openoffice owncloud
@rlandas
rlandas / api.php
Last active August 29, 2015 14:07
<?php
function array_orderby() {
$args = func_get_args();
$data = array_shift( $args );
if ( ! is_array( $data ) ) {
return array();
}
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@rlandas
rlandas / .htaccess
Last active August 29, 2015 14:06 — forked from ericmagnuson/.htaccess
Using LESS with Apache2
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule (.*\.min.css) less.php?min=yes&path=$1
RewriteRule (.*\.css) less.php?min=no&path=$1
</IfModule>
@rlandas
rlandas / ubuntu_14_04.sh
Last active August 29, 2015 14:06 — forked from h4cc/Makefile
#--- Ubuntu 14.04 LTS (Trusty Tahr)
#-
#- Basic packages i usually install
#
# - Run with:
# sudo apt-get -y install git ; git clone https://gist.github.com/7be7f940325614dc59fb.git provision ; cd provision ; sh ubuntu_14_04.sh
# Update and Upgrade
sudo apt-get update
sudo apt-get upgrade
<?php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
// config
$config = new \Doctrine\ORM\Configuration();
#############################################################################
## data source definitions
#############################################################################
source users
{
# data source type. mandatory, no default value
# known types are mysql, pgsql, mssql, xmlpipe, xmlpipe2, odbc
type = mysql
#############################################################################
## data source definitions
#############################################################################
source users
{
# data source type. mandatory, no default value
# known types are mysql, pgsql, mssql, xmlpipe, xmlpipe2, odbc
type = mysql