Skip to content

Instantly share code, notes, and snippets.

Wesley Victhor Mendes Santiago wesleyvicthor

  • kollex
  • Berlin, Germany
Block or report user

Report or block wesleyvicthor

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
Ocramius / Caddyfile
Last active Dec 5, 2019
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
View Caddyfile
:80 {
root /serve
View clock-example.php
* This is the clock interface. It's really simple, you write it once, use it anywhere.
* Cool extra things you can do:
* - have it return custom value objects
* - separate method for currentDate() without time part
interface Clock
leonderijke / svgfixer.js
Last active Sep 26, 2019
Fixes references to inline SVG elements when the <base> tag is in use.
View svgfixer.js
* SVG Fixer
* Fixes references to inline SVG elements when the <base> tag is in use.
* Firefox won't display SVG icons referenced with
* `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page.
* More info:
* -
* -
netojoaobatista / 1lr-query.php
Last active Dec 15, 2015
Obtendo registros aleatórios de uma base sem utilizar ORDER BY RAND()
View 1lr-query.php
$pdo = new PDO('mysql:host=;dbname=base', 'user', 'pswd');
$stm = $pdo->query('
SET @count = (SELECT COUNT(*) FROM tabela);
SET @query = CONCAT("SELECT * FROM `tabela` LIMIT 4 OFFSET ", 1 + FLOOR(RAND() * @count));
PREPARE stmt FROM @query;
You can’t perform that action at this time.