Skip to content

Instantly share code, notes, and snippets.

~ # 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 / 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

@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 / 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 / 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 / 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%)
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 / 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
@fntlnz
fntlnz / sysctl.conf
Created June 9, 2015 15:04
/etc/sysctl.conf tuning
# Recycle Zombie connections
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.maxtcptw=200000
# Increase number of files
kern.maxfiles=65535
kern.maxfilesperproc=16384
# Increase page share factor per process
vm.pmap.pv_entry_max=54272521
@fntlnz
fntlnz / CMakeLists.txt
Last active August 29, 2015 14:21 — forked from scan/CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
find_package(BISON)
find_package(FLEX)
add_definitions(-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS)
BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
FLEX_TARGET(MyScanner tokens.l ${CMAKE_CURRENT_BINARY_DIR}/tokens.cpp)
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)