Skip to content

Instantly share code, notes, and snippets.

View w0rldart's full-sized avatar

Al w0rldart

View GitHub Profile
@w0rldart
w0rldart / docker-compose.yaml
Last active December 23, 2024 20:49
MariaDB docker-compose with UTF8 Collation
version: '3.1'
services:
db:
image: mariadb
restart: always
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
ports:
- 3306:3306
@w0rldart
w0rldart / README.md
Last active January 29, 2018 11:38
Useful aws cli commands

Compilation of useful AWS CLI commands that I accumulate over time

Don't forget to export AWS_DEFAULT_PROFILE=MyMagicalAWSProfile :)

@w0rldart
w0rldart / docker-compose.yml
Created January 23, 2017 00:32
Docker + MySQL + Traefik
version: '2'
services:
traefik:
image: traefik
container_name: "traefik_site"
command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
ports:
- "80:80"
- "8080:8080"
@w0rldart
w0rldart / swarm.sh
Created January 20, 2017 10:20
Create a cluster of Docker Engines, a.k.a a swarm
#!/bin/sh
###
## Virtual box options
###
export VIRTUALBOX_CPU_COUNT='1'
export VIRTUALBOX_DISK_SIZE='10000'
export VIRTUALBOX_MEMORY_SIZE='512'
swarm_workers=2
@w0rldart
w0rldart / System Design.md
Created April 22, 2016 09:33 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@w0rldart
w0rldart / update-repos.sh
Last active August 29, 2017 12:17
Update all git repositories in a directory
for dir in `ls -d */`; do BASE_PATH=`pwd`; DIR_PATH=$BASE_PATH/$dir; cd $DIR_PATH; git pull; cd ../ ; done
@w0rldart
w0rldart / install-mongodb.sh
Last active April 3, 2022 00:53
Installing MongoDB on Ubuntu 15.04
#!/bin/sh
##
## Bash install script for mongo 3.2 for Ubuntu 15.04, because of
## the replacement of upstart with systemd
##
## - AUTHOR: Alexandru Budurovici <https://w0rldart.com>
## - VERSION: 1.0
##
@w0rldart
w0rldart / iso8601.php
Created September 12, 2015 12:31
ISO 8601 to seconds
/**
* Convert ISO 8601 values like PT15M33S
* to a total value of seconds.
*
* @param string $ISO8601
*/
function ISO8601ToSeconds($ISO8601)
{
preg_match('/\d{1,2}[H]/', $ISO8601, $hours);
preg_match('/\d{1,2}[M]/', $ISO8601, $minutes);
@w0rldart
w0rldart / logs.sql
Last active December 15, 2015 02:59
logs database for my apps
--
-- Database: `logs`
--
DROP DATABASE `logs`;
CREATE DATABASE `logs` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `logs`;
-- --------------------------------------------------------