Skip to content

Instantly share code, notes, and snippets.

View displaynone's full-sized avatar

Luis Sacristán displaynone

View GitHub Profile
@displaynone
displaynone / error_log_color.php
Last active May 20, 2021 07:58
PHP error log color
<?php
// https://stackoverflow.com/a/13101631
$colorFormats = array(
// styles
// italic and blink may not work depending of your terminal
'bold' => "\033[1m%s\033[0m",
'dark' => "\033[2m%s\033[0m",
'italic' => "\033[3m%s\033[0m",
@displaynone
displaynone / video2gif.sh
Last active August 13, 2021 15:19
Convert video to GIF
$ more /usr/local/bin/video2gif.sh
#!/bin/bash
# https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/
echo "Video file: "
read video_file
echo "Video start position (HH:MM:SS): "
read start_seek