Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ludofleury's full-sized avatar
🐼
Yay

Ludovic Fleury ludofleury

🐼
Yay
View GitHub Profile
@nico3333fr
nico3333fr / hama-grid-generator.php
Last active April 5, 2022 15:48
Pixel Art helper script for Hama beads
<?php
// supposed to be a BMP image, as sprites are really small :)
if ( @$_GET['directfile']!='' ){
$img_name = $_GET['directfile'];
}
$resource = imagecreatefrombmp($img_name);
$width = imagesx($resource);
# 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"
@0xjac
0xjac / private_fork.md
Last active April 21, 2024 13:25
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

#!/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
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@GitsMcGee
GitsMcGee / circle.yml
Created December 14, 2014 22:42
CircleCI config for Play 2.3 and Elastic Beanstalk
machine:
environment:
JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8 -Duser.timezone=UTC'
_JAVA_OPTIONS: '-Xms512m -Xmx1024m -Xss2m'
java:
version: oraclejdk8
python:
version: 2.7.6
services:
- docker
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Jean-Pierre subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="innovation" title="innovation">
<outline type="rss" text="Pl4n3s world" title="Pl4n3s world" xmlUrl="http://pl4n3.blogspot.com/feeds/posts/default?alt=rss" htmlUrl="http://pl4n3.blogspot.com/"/>
<outline type="rss" text="Mozilla Hacks - the Web developer blog" title="Mozilla Hacks - the Web developer blog" xmlUrl="http://hacks.mozilla.org/feed/" htmlUrl="https://hacks.mozilla.org"/>
<?php
namespace Playbloom\Tests;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
class MysqlDriver extends Driver
{
private static $connection;
@nfabre
nfabre / Symfony Live Paris.markdown
Last active October 7, 2020 12:27
Slides Symfony Live 2013
@ludofleury
ludofleury / MysqlContext.php
Last active November 8, 2021 14:41
A Behat Context with a hook to kill the Mysql connections
<?php
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Behat\Symfony2Extension\Context\KernelDictionary;
use Behat\MinkExtension\Context\MinkContext;
class MysqlContext extends MinkContext implements KernelAwareInterface
{
use KernelDictionary;