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
htruong / chroot-to-pi.sh
Last active Nov 9, 2019
Chroot to pi sd card
View chroot-to-pi.sh
#!/bin/bash
# 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: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@umardx
umardx / Pi3_as_WiFi_AP_Bridge.md
Last active Sep 30, 2018
Using a Raspberry Pi 3 as a Wifi access point and bridge
View Pi3_as_WiFi_AP_Bridge.md

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
gzagatti / tmux_break_pane.md
Last active May 2, 2018
Break tmux pane to background
View tmux_break_pane.md

from Stack Exchange

Break tmux pane

Select target pane and enter Prefix-:

break-pane -dP
@Manu343726
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
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>
ServerAdmin admin@example.com
DocumentRoot /var/www
ServerName docker.example.com
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
@Liryna
Liryna / ARMDebianUbuntu.md
Last active Nov 16, 2019
Emulating ARM on Debian/Ubuntu
View ARMDebianUbuntu.md

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
thomasfr / autossh.service
Last active Nov 2, 2019
Systemd service for autossh
View autossh.service
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@plentz
plentz / nginx.conf
Last active Nov 18, 2019
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@todgru
todgru / starttmux.sh
Last active Oct 17, 2019
Start up tmux with custom windows, panes and applications running
View starttmux.sh
#!/bin/sh
#
# 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`
#
session="work"
@spikegrobstein
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 plex-server.example.com:32400 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 plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
You can’t perform that action at this time.