Skip to content

Instantly share code, notes, and snippets.

@re3lex
re3lex / README.md
Created May 13, 2023 06:17 — forked from qdm12/README.md
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

@re3lex
re3lex / wireguard.md
Created March 26, 2023 04:57 — forked from owlscatcher/wireguard.md
Инструкция по нрастройке своего VPN сервера на облаке DigitalOcean
@re3lex
re3lex / slick-terminal.md
Created June 12, 2022 06:40 — forked from cristian-aldea/slick-terminal.md
Ubuntu + Zsh + Oh My Zsh + Powerlevel10k = Sliiiiiiiiiiiiick

Based on: https://gist.github.com/kevin-smets/8568070

This gist outlines the steps needed to setup zsh, ohmyzsh and the powerlevel10k theme, available for anyone to follow.

  1. Setup required dependencies

    # update packages
    sudo apt update
    
@re3lex
re3lex / eink_demo.ino
Created January 26, 2020 10:22 — forked from xxlukas42/eink_demo.ino
MH-ET LIVE 1.54-inches E-Paper demo
#include <GxEPD.h>
#include <GxGDEP015OC1/GxGDEP015OC1.cpp>
#include <Fonts/OpenSansBold12pt7b.h>
#include <Fonts/OpenSansBold14pt7b.h>
#include <Fonts/OpenSansBold30pt7b.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.cpp>
#include <GxIO/GxIO.cpp>
#include GxEPD_BitmapExamples
@re3lex
re3lex / DataService.java
Last active April 7, 2018 13:04
Retrofit2 file upload
public interface DataService {
@Multipart
@POST("rest/saveInvoice")
Call<Response<Invoice>> saveInvoice(@NonNull @Part("data") RequestBody data, @Part MultipartBody.Part image);
}
@re3lex
re3lex / AutocompleteTagsEditText.java
Created March 31, 2018 07:04
Android view which implements tag field with autocomplete. It is combining two components
package com.lex.billstorage.components.tag;
import android.content.Context;
import android.databinding.BindingAdapter;
import android.databinding.InverseBindingAdapter;
import android.databinding.InverseBindingListener;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.text.Spannable;
@re3lex
re3lex / wpstest.ino
Created April 25, 2016 20:40 — forked from copa2/wpstest.ino
Example for WPS connection with https://github.com/esp8266/Arduino
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(115200);
delay(1000);
Serial.printf("\nTry connecting to WiFi with SSID '%s'\n", WiFi.SSID().c_str());
WiFi.mode(WIFI_STA);
WiFi.begin(WiFi.SSID().c_str(),WiFi.psk().c_str()); // reading data from EPROM, last saved credentials
while (WiFi.status() == WL_DISCONNECTED) {