Skip to content

Instantly share code, notes, and snippets.

@fntlnz
fntlnz / docker-compose.yml
Created June 10, 2015 08:10
Drone on Docker With Nginx and Drone Wall
drone:
image: drone/drone
restart: always
privileged: true
volumes:
- /data/drone:/var/lib/drone
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SESSION_SECRET=yoursessionsecrethere
- DRONE_GITHUB_CLIENT=yourgithubclientkey
nginx:
image: fntlnz/nginx
volumes:
- docker/nginx/conf:/usr/local/nginx/conf
- docker/nginx/logs:/usr/local/nginx/logs
volumes_from:
- fpm
links:
- fpm:fpm
@fntlnz
fntlnz / tests.md
Last active August 29, 2015 14:25
PHPUnit PHP (5.5.16, 5.6.11, 7.0.0alpha1, 7.0.0beta1, 7.0.0beta2)

PHP 5.5.16

PHPUnit 4.7.6 by Sebastian Bergmann and contributors.

Runtime:        PHP 5.5.16
Configuration:  /project/phpunit.xml.dist

...............................................................  63 / 144 ( 43%)
............................................................... 126 / 144 ( 87%)
@fntlnz
fntlnz / dns-check.php
Created July 24, 2015 10:08
php dns check
<?php
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$i = 0;
$maxTime = 0;
@fntlnz
fntlnz / i3wm-fedora.md
Last active July 8, 2021 01:31
i3wm fedora lightdm

Install i3

dnf install i3

Add exec i3 to xinitrc

echo "exec i3" > ~/.xinitrc
@fntlnz
fntlnz / xrandr-examples.md
Created September 25, 2015 07:25
xrandr examples

Put projector DP1 right to built in screen eDP1

xrandr --output eDP1 --auto --primary --output DP1 --auto --right-of eDP1
@fntlnz
fntlnz / yubikey-fedora-udev.md
Last active March 9, 2020 10:24
Yubikey U2F Token CentOS/RHEL/Fedora udev rules

To use a yubico U2F token on CentOS/RHEL/Fedora you need to add the specific udev file to your system to recognize them.

Get the udev rules

wget -O /etc/udev/rules.d/70-u2f.rules https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules

Reload device events

~ # cat /proc/cpuinfo

system type             : TrendChip TC3162U SOC
processor               : 0
cpu model               : R3000 V0.1
BogoMIPS                : 330.95
wait instruction        : no
microsecond timers      : no
tlb_entries             : 32
extra interrupt vector : no
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@fntlnz
fntlnz / docker-service-nfs.md
Last active March 28, 2020 19:09
Docker service nfs mount
docker service create --mode global --mount type=volume,volume-opt=o=addr=10.3.20.25,volume-opt=device=:/share/poc1/pluto,volume-opt=type=nfs,source=pluto,target=/pluto --name nfstest alpine top