Skip to content

Instantly share code, notes, and snippets.

View sebthemonster's full-sized avatar

sebthemonster

  • Bordeaux, France
View GitHub Profile
@qdm12
qdm12 / README.md
Last active April 14, 2024 19:11
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 😉)

@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@gismo141
gismo141 / remove_gui_from_debian.sh
Last active March 26, 2024 07:55
Remove all GUI-related Packages from Existing Debian-Installation
apt-get remove -y --purge x11-common
apt-get autoremove -y --purge
apt-get install -y deborphan
deborphan | xargs dpkg -P # do this a bunch of times
@basgys
basgys / simple_paperclip.rb
Created June 5, 2013 08:25
Use Paperclip without ActiveRecord
# == Paperclip without ActiveRecord
#
# Simple and lightweight object that can use Paperclip
#
#
# Customized part can be extracted in another class which
# would inherit from SimplePaperclip.
#
# class MyClass < SimplePaperclip
# attr_accessor :image_file_name # :<atached_file_name>_file_name
@imminent
imminent / AccountUtils.java
Created November 12, 2012 19:55
Utility to retrieve user profile on Android device
/**
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session
* app.
* @author Dandré Allison
*/
public class AccountUtils {
/**
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}.
*/
@ivliaspiration
ivliaspiration / bootstrap_form_builder.rb
Created March 18, 2012 20:00
Twitter Bootstrap FormBuilder
# FormBuilder for Ruby on Rails which produces HTML code compatible with Twitter Bootstrap
# horizontal forms styles (see here: http://twitter.github.com/bootstrap/base-css.html#forms)
#
# Features:
# * displays validation errors in-line
# * has custom option - label-text - to override default label text for an input
#
# Requirements:
# By default, Rails will wrap a field with validation error in an ugly div tag that breaks
# the layout. To override this behaviour, add
require "money"
class Decorator < BasicObject
undef_method :==
def initialize(component)
@component = component
end
def method_missing(name, *args, &block)