Skip to content

Instantly share code, notes, and snippets.

Kleo Bercero kbeflo

Block or report user

Report or block kbeflo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
htruong /
Last active Nov 9, 2019
Chroot to pi sd card
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits:
# make sure you have issued
umardx /
Last active Sep 30, 2018
Using a Raspberry Pi 3 as a Wifi access point and bridge

The specificity of my setup, is that the Raspberry won’t be a router but a bridge. DHCP is thus delegated to the main ADSL router and all devices connected to the AP will appear on the same network than other devices. The instructions below are based on a fresh Raspbian lite install so that it can be reproduced easily.

Install the required packages :

$ sudo apt-get install -y bridge-utils hostapd

To create a bridge, we need to enable ip_forward in the kernel, for that, edit /etc/sysctl.conf and remove comment (#) from the following line :

gzagatti /
Last active May 2, 2018
Break tmux pane to background

from Stack Exchange

Break tmux pane

Select target pane and enter Prefix-:

break-pane -dP
Manu343726 / gist:ca0ceb224ea789415387
Created Sep 19, 2015
Running ARM docker image with QEMU on x86_64 Arch Linux host
View gist:ca0ceb224ea789415387
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
deardooley / 000-default.conf
Last active Nov 5, 2018
Sample Apache virtual host to proxy subdomain to docker container
View 000-default.conf
<VirtualHost *:80>
DocumentRoot /var/www
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
Liryna /
Last active Nov 16, 2019
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

thomasfr / autossh.service
Last active Nov 2, 2019
Systemd service for autossh
View autossh.service
Description=Keeps a tunnel to '' open
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
plentz / nginx.conf
Last active Nov 18, 2019
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
todgru /
Last active Oct 17, 2019
Start up tmux with custom windows, panes and applications running
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
spikegrobstein / nginx.conf
Last active Jun 20, 2019
nginx config for proxying requests for plex over a hostname-based virtualhost.
View nginx.conf
upstream plex-upstream {
# change to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server {
listen 80;
# server names for this server.
You can’t perform that action at this time.