Skip to content

Instantly share code, notes, and snippets.

🌖
It's happening

Alex Rock Pierstoval

🌖
It's happening
Block or report user

Report or block Pierstoval

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View OUTPUT.txt
pierstoval@PIERSTOVAL /mnt/e/dev/www/sandbox $ ./test.bash
KO for key ALLUSERSPROFILE
KO for key APPDATA
KO for key CLINK_DIR
KO for key CommonProgramFiles
KO for key CommonProgramW6432
KO for key COMPUTERNAME
KO for key ComSpec
KO for key FPS_BROWSER_APP_PROFILE_STRING
View img_to_output_via_memory.php
<?php
$h = fopen('php://memory', 'ab+');
$gd = @imagecreate(110, 20);
if (false === $gd) {
throw new \RuntimeException('GD image is invalid');
}
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:

You can’t perform that action at this time.