Skip to content

Instantly share code, notes, and snippets.

View decima's full-sized avatar
🐙
Lecturing

decima

🐙
Lecturing
View GitHub Profile
@decima
decima / http_statuscodes.php
Last active September 29, 2018 18:27 — forked from Stoffo/http_statuscodes.php
PHP Array with all HTTP Status Codes
<?
$http_codes = array(
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
@decima
decima / perlin.php
Last active November 16, 2017 22:44
Perlin script
<?php
set_time_limit(0);
//This is a port of Ken Perlin's "Improved Noise"
// http://mrl.nyu.edu/~perlin/noise/
// Originally from http://therandomuniverse.blogspot.com/2007/01/perlin-noise-your-new-best-friend.html
// but the site appears to be down, so here is a mirror of it
class Perlin
{
var $p, $permutation, $seed;
var $_default_size = 64;
@decima
decima / gist:5ab122df5fd5414b29cd81a1c8acbcfe
Created January 29, 2018 12:15 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
composer create-project symfony/skeleton test_sf4
cd test_sf4
composer require requirements-checker
php -S 0.0.0.0:9999 public
then go to ip_of_the_server:9999/check.php
@decima
decima / generics.php
Last active September 29, 2018 18:25
First try to create generic types in php :3
<?php
// This is the hidden part ;-)
trait Generic
{
private $_T = null;
private $__generic_nullable = false;
private $__originalObject = null;
/**
@decima
decima / ducks.sh
Last active May 1, 2024 16:26
Small CLI Tool which lists biggest top 10 files/folders
#!/bin/sh
du -hsx ${1:-.}/* | sort -rh | head -10
@decima
decima / tutorial-screen.md
Last active December 4, 2019 14:37
How to use screen tutorial

Screen Tutorial

Outside of a screen

Launch a new screen session and enter in it

screen

See the list of screens

screen -ls
@decima
decima / mercure.compose.yml
Last active February 28, 2024 12:43
Mercure simple development environment with docker
version: "3.7"
services:
mercure:
image: dunglas/mercure
environment:
MERCURE_PUBLISHER_JWT_KEY: 'changeme'
MERCURE_SUBSCRIBER_JWT_KEY: 'changeme'
SERVER_NAME: ":80"
MERCURE_EXTRA_DIRECTIVES: |-
cors_origins "http://127.0.0.1:8000"
@decima
decima / resetCSS.css
Last active August 20, 2021 08:00
Reset CSS - the simple way.
body *{
all: unset;
}
@decima
decima / Databases with docker-compose
Last active October 23, 2023 19:31
Docker-compose for databases
Here is a curated list of docker-compose for some databases I use.