Skip to content

Instantly share code, notes, and snippets.

🌖

Alex Rock Pierstoval

🌖
View GitHub Profile
View .php_cs
<?php
$finder = PhpCsFixer\Finder::create()
->exclude([
'vendor',
])
->in([
__DIR__.'/src/',
__DIR__.'/tests/'
])
View mysql_docker.bash
docker run \
--name=mysql_host \
-dit -e MYSQL_ROOT_PASSWORD=mysql \
-p 3306:3306 \
mysql:5.7
View Git_gc.md

Git gc script to save space

Place this at the "root" of your git repos, or even your projects directory.

Like /var/www/git_gc.bash for example, if you save many projects under this dir.

This script will run git reflog expire and git gc with extra options to save some space when working with heavy & often rebased projects.

@Pierstoval
Pierstoval / _One_File_Symfony_Application.md
Last active Apr 2, 2019
One-file Symfony application
View _One_File_Symfony_Application.md

Symfony application with one file

(ok, 2 files with composer.json and 3 if you need an .htaccess file...)

Now there's a MicroKernel class in Symfony 2.8 and it's awesome!

Advantages

Light

@Pierstoval
Pierstoval / Makefile
Last active Apr 2, 2019
RequestTracker bootstraping makefile
View Makefile
RTDIR = ${REQUEST_TRACKER_DIR}
echo:
@echo "${WOW}"
##
## RequestTracker
## --------------
##
@Pierstoval
Pierstoval / Base_Gulpfile.md
Last active Apr 2, 2019
Configuration-based Gulpfile
View Base_Gulpfile.md
@Pierstoval
Pierstoval / pre-receive.bash
Last active Apr 9, 2019
Git pre-receive example
View pre-receive.bash
#!/bin/bash
########################################################################
################################ README ################################
########################################################################
#
# This script is here to allow the use of "git push prod v1.2.3" commands or similar.
#
# Push a tag to a bare repository having this file as pre-receive hook,
# and you'll be able to deploy directly from command line in your local environment,
View keybase.md

Keybase proof

I hereby claim:

  • I am pierstoval on github.
  • I am pierstoval (https://keybase.io/pierstoval) on keybase.
  • I have a public key ASDMqGJzpJ2OMQa9tDDwznVYnbzPVW7K4oDlKUBliBawWAo

To claim this, I am signing this object:

View AdminPostController.php
<?php
declare(strict_types=1);
/*
* (c) Alexandre Rock Ancelet <pierstoval@gmail.com> and Studio Agate.
*
* Licensed with MIT
*/
View change_bg.bash
# Change the current background according to a distant URL.
# Needs the "feh" package to work.
DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority feh --bg-center http://rammb.cira.colostate.edu/ramsdis/online/images/latest/himawari-8/full_disk_ahi_natural_color.jpg
# Source: https://twitter.com/docteur_klein/status/1130730930031779840
You can’t perform that action at this time.