Skip to content

Instantly share code, notes, and snippets.

View lobre's full-sized avatar

Loric Brevet lobre

View GitHub Profile
@lobre
lobre / enableGnomeExtensions.py
Created April 30, 2014 13:52
Enable gnome extensions at startup
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from os import listdir
from os import popen
from os.path import isdir, join, expanduser
import time
pre_installed_ext_folder = "/usr/share/gnome-shell/extensions"
my_ext_folder = "{}/.local/share/gnome-shell/extensions".format(expanduser("~"))
@lobre
lobre / _grid.scss
Last active June 15, 2018 13:05
Sass responsive grid
* {
@include box-sizing(border-box);
}
/****************************************************\
VARIABLES
\****************************************************/
$columns: 12 !default;
$gutter: 20px !default;
@lobre
lobre / Gruntfile.js
Last active August 29, 2015 14:03
Gruntfile
module.exports = function(grunt) {
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
jshint: {
all: ['js/*.js']
@lobre
lobre / cVim
Last active August 29, 2015 14:15
cVim
let blacklists = ["https://mail.google.com/*","https://inbox.google.com/*","http://feedly.com/*","https://duckduckgo.com/*","https://www.facebook.com/*","https://twitter.com/*","https://www.google.fr/*","https://www.google.com/*","https://www.google.ch/*","https://www.youtube.com/*"]
let defaultengine = "duckduckgo"
@lobre
lobre / .xbindkeyrc
Created February 28, 2015 22:10
Trackpad T650 gestures
#Three-finger swipe left
"/home/moy4/.bin/workspace-switcher.py right"
b:8
#Three-finger swipe right
"/home/moy4/.bin/workspace-switcher.py left"
b:9
#Top edge swipe
"dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:4"
@lobre
lobre / vimium_hints.css
Last active August 29, 2015 14:22
Vimium hints css
div > .vimiumHintMarker {
background: #34495e;
border-radius: 0px;
padding: 1px 3px;
border: none;
}
div > .vimiumHintMarker span {
color: white;
font-weight: normal;
@lobre
lobre / nginx
Last active January 26, 2020 08:21
Kimsufi Nginx
server {
listen 80;
server_name lobr.fr proxmox.lobr.fr;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443;
server_name lobr.fr;
ssl on;
@lobre
lobre / db.py
Created December 22, 2016 14:38
Python interactive startup script for manipulating a Magento MySQL DB
#!/usr/bin/python
# -*- coding: utf8 -*-
# sudo pip3 install mysqlclient xmltodict
import os
import MySQLdb
import xmltodict
import argparse
@lobre
lobre / docker-compose.yml
Created January 10, 2017 10:34
Docker compose vpn
version: '2'
services:
server:
image: "jpetazzo/dockvpn"
container_name: "vpn"
privileged: true
ports:
- "1194:1194/udp"
- "443:443/tcp"
@lobre
lobre / import-config.sh
Created November 17, 2017 11:19
Process all gotpl templates to a destination with fallback on cp
#!/bin/ash
source=$1
dest=$2
if [[ -z "${source}" || -z "${dest}" ]]; then
echo "ERROR. Missing params!"
exit
fi