Skip to content

Instantly share code, notes, and snippets.

View odnanref's full-sized avatar
💭
I may be slow to respond.

Fernando Andre odnanref

💭
I may be slow to respond.
  • Porto, Portugal
  • 06:26 (UTC +01:00)
View GitHub Profile
@odnanref
odnanref / nomad.hcl
Created May 27, 2022 22:12
nomad.hcl sample config with glusterfs local directory
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
server {
enabled = true
bootstrap_expect = 2
encrypt = "+HT7OPk+vyPzXQ="
}
@odnanref
odnanref / pihole.nomad
Created February 12, 2022 10:55
PiHole LoadBalance UDP and HTTP
job "pihole" {
datacenters = ["dc1"]
type = "service"
group "pihole" {
count = 1
volume "volume_nomad" {
type = "host"
read_only = false
@odnanref
odnanref / ca.md
Created April 11, 2018 00:17 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@odnanref
odnanref / something.js
Created December 5, 2016 00:09
$1 has no parameter
/**
O nodejs nisto só emite erro quando chamo a função e emite o erro que $1 não tem parametro
demorei a perceber que tinha um ) mal colocado.
Acho que é por causa disto que prefiro scala.
*/
function userAccess(sender_id, message) {
pg.connect(process.env.DATABASE_URL, function(err, client) {
console.log("userAccess>connecting to pgsql");
<?php
namespace Far\UserBundle\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;