Skip to content

Instantly share code, notes, and snippets.

View jdeniau's full-sized avatar
🐘
Meeeh !

Julien Deniau jdeniau

🐘
Meeeh !
View GitHub Profile
@jdeniau
jdeniau / .gitconfig
Last active December 9, 2015 22:18 — forked from anonymous/.gitconfig
[user]
name = Julien Deniau
email = julien.deniau@gmail.com
[alias]
st = status
lg = log --graph --all --format=format:'%C(blue)%h%C(reset) - %C(cyan)%aD%C(reset) %C(green)(%ar)%C(reset)%C(yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(white)— %an%C(reset)' --abbrev-commit
[color]
ui = auto
[help]
<?xml version="1.0" encoding="UTF-8"?>
<project name="mapado/website" default="build" basedir=".">
<property name="builddir" value="${project.basedir}/build" override="true" />
<property name="srcdir" value="${project.basedir}/src" override="true" />
<!-- ================================================================== -->
<!-- Construction -->
<!-- ================================================================== -->
<target name="build" depends="clean-up, dependencies, cache, assetic, pdepend, phpmd, phpcpd, phpcs, phploc, atoum" />
@jdeniau
jdeniau / 1. without_generator.php
Created February 26, 2013 09:01
atoum setUp + mock
<?php
namespace Plop\Tests\Units\Doctrine;
use \atoum;
class Plip extends atoum
{
@jdeniau
jdeniau / composer.json
Created March 6, 2013 13:17
KnaLESS with composer
{
"minimum-stability": "dev",
"require": {
"knacss/knaless" : "dev-master"
},
"repositories": [
{
"type": "package",
"package" : {
"name": "knacss/knaless",
@jdeniau
jdeniau / 1-virtualenv.sh
Last active April 19, 2017 18:02
Install Graphite in a virtualenv (python2.7) with apache and StatsD (Debian Squeeze)
# create the virtualenv and work on it
mkvirtualenv graphite
workon graphite
cd $VIRTUAL_ENV # we are now in /home/envs/graphite/ . If you are not, you may have a problem with your virtualenv
# apparently you have to make a symlink because cairo does not work with python 2.7 and pip
# my cairo module was located on /usr/lib/pymodules/python2.7/cairo Check this path, it may change on your server.
# You can execute `locate cairo` to find out.
# if this step does not work, you will not have any graphics in graphite later
ln -s /usr/lib/pymodules/python2.7/cairo ./lib/python2.7/
@jdeniau
jdeniau / virtualenv.sh
Created March 27, 2013 15:30
Graphite - virtualenv
# create the virtualenv and work on it
mkvirtualenv graphite
workon graphite
cd $VIRTUAL_ENV # we are now in /home/envs/graphite/ . If you are not, you may have a problem with your virtualenv
# apparently you have to make a symlink because cairo does not work with python 2.7 and pip
# my cairo module was located on /usr/lib/pymodules/python2.7/cairo Check this path, it may change on your server.
# You can execute `locate cairo` to find out.
# if this step does not work, you will not have any graphics in graphite later
ln -s /usr/lib/pymodules/python2.7/cairo ./lib/python2.7/
@jdeniau
jdeniau / graphite.sh
Created March 27, 2013 15:31
Graphite - install graphite
# create the directory
mkdir /opt/graphite
# make directory writable by whoever your want. You can chmod 777 if you want to: sudo chmod 777 /opt/graphite
# in our exemple, the "users" group, and www-data user (who execute apache) will have write and execute rights
sudo setfacl -dR -m m:rwx -m u:www-data:rwx -m g:users:rwx /opt/graphite
sudo setfacl -R -m m:rwx -m u:www-data:rwx -m g:users:rwx /opt/graphite
# install all required packages
pip install django==1.3 # Graphite does not seems to work with django >= 1.4
@jdeniau
jdeniau / graphite.apacheconf
Created March 27, 2013 15:32
Graphite - VirtualHost
<VirtualHost *:80>
ServerName graphite.example.com
ServerAlias graphite.example.com
DocumentRoot "/opt/graphite/webapp"
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
@jdeniau
jdeniau / local.json
Created March 27, 2013 15:32
Graphite - local.json debug
{
graphitePort: 2003
, graphiteHost: "127.0.0.1"
, port: 8125
, backends: [ "./backends/graphite", "./backends/console" ]
, debug: true
}
@jdeniau
jdeniau / local.json
Created March 27, 2013 15:33
Graphite - local.json
{
graphitePort: 2003
, graphiteHost: "127.0.0.1"
, port: 8125
, backends: [ "./backends/graphite" ]
}