Skip to content

Instantly share code, notes, and snippets.

Avatar
🐼
Yay

Ludovic Fleury ludofleury

🐼
Yay
View GitHub Profile
View gist:cd91e6f193a04c11d52dfb15a6117978
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
View gist:1078d527f9eb747667e2b0751186e20c
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH:/Users/ludo/Library/Python/3.7/bin
# Path to your oh-my-zsh installation.
export ZSH="/Users/ludo/.oh-my-zsh"
ZSH_THEME="powerlevel9k/powerlevel9k"
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
@ludofleury
ludofleury / docker-compose.yml
Created Oct 31, 2018
Docker Compose shared host based named volume with ${PWD} variant for mac
View docker-compose.yml
version: "3.0"
services:
composer:
image: composer/composer
working_dir: /var/app
volumes:
- project:/var/app
- ./var/composer:/composer
volumes:
View git-impact.sh
#!/bin/bash
# use newline as separator
IFS=$'\n'
for author in $(git log --all --format='%cN' | sort -u); do
echo $author;
git log --all --author="$author" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "++ %s\n-- %s\n= %s\n", add, subs, loc }' -
done
@ludofleury
ludofleury / documented-endpoints
Created May 4, 2015
twitter RESt Public API inconsistencies
View documented-endpoints
account/remove_profile_banner
account/settings
account/settings
account/update_delivery_device
account/update_profile
account/update_profile_background_image
account/update_profile_banner
account/update_profile_image
account/verify_credentials
application/rate_limit_status
View gist:11157882
vagrant plugin install vagrant-berkshelf --plugin-version 2.0.1 --verbose
Installing the 'vagrant-berkshelf --version '2.0.1'' plugin. This can take a few minutes...
Fetching source index from http://gems.hashicorp.com/
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable (2.3.6)
Using multipart-post (2.0.0)
Using faraday (0.9.0)
Using berkshelf-api-client (1.2.0)
View CountrySpec.php
<?php
public function it_is_initializable()
{
$this->beConstructedWith('FR');
$this->shouldHaveType(Country::class);
}
public function its_constructor_requires_a_valid_country_isocode()
{
View single-connection-driver.php
<?php
namespace Playbloom\Tests;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
class MysqlDriver extends Driver
{
private static $connection;
View simple.php
<?php
$myCountry = // your api call ....
echo '<html><head></head><body>'
echo $myCountry;
echo '</body>';
View regex.php
<?php
$pattern = '#^((\+33[\s|\.]?[1-9]{1})|(0\d{1}))([\s|\.]?[0-9]{2})#';
// $pattern = '#^O{1}#';
// $subpattern = '([\s|\.]?[0-9]{2}){8}';
$samples = [
'+33 1 22 33 44 55',
'01 02 03 04 05',
You can’t perform that action at this time.