Skip to content

Instantly share code, notes, and snippets.

View ClaudioVarandas's full-sized avatar

Cláudio Varandas ClaudioVarandas

  • Lisbon Portugal
  • 03:24 (UTC +01:00)
View GitHub Profile
@ClaudioVarandas
ClaudioVarandas / rabbitmq.txt
Created March 9, 2020 16:21 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
@ClaudioVarandas
ClaudioVarandas / datetime.php
Created February 26, 2019 14:29 — forked from graste/datetime.php
PHP DateTime class – parsing and formatting ISO8601 dates with or w/o fractions of a second
<?php
echo 'default locale: ' . \Locale::getDefault();
echo PHP_EOL;
echo 'default timezone: ' . \date_default_timezone_get();
echo PHP_EOL;
// see http://tools.ietf.org/html/rfc3339#section-5.8 for example datetimes
// bug report on missing fractions support: https://bugs.php.net/bug.php?id=51950
// feature request for fractions support in constructor: https://bugs.php.net/bug.php?id=49779
@ClaudioVarandas
ClaudioVarandas / docker-destroy-all.sh
Created September 27, 2017 11:07 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@ClaudioVarandas
ClaudioVarandas / dom-helper.js
Created March 31, 2017 07:41 — forked from SitePointEditors/dom-helper.js
Mini jQuery, sort of.
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
@ClaudioVarandas
ClaudioVarandas / dom-helper.js
Created March 31, 2017 07:40 — forked from SitePointEditors/dom-helper.js
Mini jQuery, sort of.
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
@ClaudioVarandas
ClaudioVarandas / migrate.sh
Created September 16, 2016 23:10 — forked from pjmazenot/migrate-mamp-to-mysql-5.7.sh
Upgrade MAMP 3.5 to MySQL 5.7 tested 2016/09/17
#!/bin/sh
# Original by Ken Lin
# Updated by Pierre-Julien Mazenot
#
# - Mysql version 5.7.9 -> 5.7.11
# - Comments
#
# Additional notes after last tests
#