Skip to content

Instantly share code, notes, and snippets.

View lexoyo's full-sized avatar
🥰
working full time on silex.me (foss)

Alex Hoyau lexoyo

🥰
working full time on silex.me (foss)
View GitHub Profile

Teads Managed Services Workflow

The straight Git flow

git flow

The main branches

  • master
<?php
/**
* Recurses each directory and runs PHP's lint function against each file
* to test for parse errors.
*
* @param string $dir the directory you would like to start from
* @return array the files that did not pass the test
*/
function lint( $dir = 'C:\dev\\' )
@lexoyo
lexoyo / index.js
Last active October 9, 2015 12:46 — forked from MikeFielden/index.js
Enum-like structure in es2015
const Shape = {
Triangle: new Symbol()
};
// Demo func
function getArea(shape, options) {
var area = 0;
switch (shape) {
case Shape.Triangle:
@lexoyo
lexoyo / admin-template.html
Last active November 21, 2015 12:25
Use github API directly, without a SDK
<html>
OK LOGGED IN
<ul>
<li>
<a href='/repo'>repo<a>
</li>
</ul>
</html>
@lexoyo
lexoyo / twitter-tools.user.js
Last active December 6, 2015 14:27
Install a "user script" plugin for your browser, and click on "raw" bellow... Then go to twitter and follow the followers of someone. And then after a while unfollow all those you have never retwitted.
// ==UserScript==
// @name twitter-tools
// @namespace lexoyo.user.scripts
// @description Add buttons twitter to gain useful real followers
// @include https://twitter.com/*
// @version 1.1.4
// @run-at document-end
// @grant none
// ==/UserScript==
@lexoyo
lexoyo / tmux.conf
Last active December 12, 2015 16:16 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
set-option -g prefix C-a
unbind-key C-b
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
@lexoyo
lexoyo / .tmux.conf
Last active September 24, 2018 09:16
my fedora23 terminal setup (tmux and vim)
set-option -g prefix C-a
unbind-key C-b
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
# set-window-option -g automatic-rename on
# set-option -g set-titles on
@lexoyo
lexoyo / .bashrc
Last active January 1, 2016 16:28
My bash prompt
# needs this: curl -L https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > ~/.bash_git
source ~/.bash_git
# comes from http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
@lexoyo
lexoyo / align-widget.js
Last active March 26, 2016 13:47 — forked from anonymous/align-widget.js
align widget for silex
silex.model.Widget.register(function(model, view, controller) {
return {
title: 'Align tool',
description: 'This widget displays buttons to align selected elements.',
selection: [],
@lexoyo
lexoyo / vidadeo-add.js
Created May 8, 2016 11:44
hacks social nets
// on http://www.viadeo.com/network/requests/
// accepts or requests 100 people
var idx = 0; function dome(){ $('.vicon-add').click(); window.scrollBy(0, 150); if(idx++<100) { setTimeout(dome, 500) } }; dome();