Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# amigo-invisible.sh
#
# Este script gestionará un archivo amigos.csv con siguiente el formato:
# nombre,email
#
# Limitaciones:
# - El .csv no puede contener líneas en blanco
# - El sorteo puede ser lento/ineficiente con listas de amigos MUY largas
@Nyr
Nyr / openvpn-useradd-bulk.sh
Last active October 2, 2023 03:50
Simple script for adding users in bulk to an openvpn-install setup
#!/bin/bash
# Fast way for adding lots of users to an openvpn-install setup
# See the main openvpn-install project here: https://github.com/Nyr/openvpn-install
# openvpn-useradd-bulk is NOT supported or maintained and could become obsolete or broken in the future
# Created to satisfy the requirements here: https://github.com/Nyr/openvpn-install/issues/435
if readlink /proc/$$/exe | grep -qs "dash"; then
echo "This script needs to be run with bash, not sh"
exit 1
@Nyr
Nyr / upload.php
Last active March 22, 2016 14:56
Very simple file upload script for private use
<?php
// Very simple file upload script
// ----------------------------------------------
// I'm a shitty coder, so this is a shitty script
/////////////////////////////////////////////////////////////
// Fill these three variables
$allowedip = '1.2.3.4'; // IP address allowed to upload
$serveurl = 'https://uploads.example.com/';
$uploaddir = '/srv/uploads.example.com/htdocs/';
@Nyr
Nyr / imgur-gif-to-gifv.user.js
Last active August 29, 2015 14:14
Turn imgur GIF links into GIFV
// ==UserScript==
// @name imgur GIF to GIFV
// @description Turn imgur GIF links into GIFV.
// @exclude *imgur.com*
// @version 1.2.1
// @grant none
// @run-at document-start
// ==/UserScript==
(function () {
@Nyr
Nyr / imgur-direct-images.user.js
Last active May 9, 2024 20:48
Redirect imgur to the raw images skipping the crappy HTML pages
// ==UserScript==
// @name imgur direct images
// @description Redirect to the raw images skipping the crappy HTML pages.
// @include /^https?:\/\/imgur\.com\/[A-Za-z0-9]+$/
// @exclude *imgur.com/vidgif
// @exclude *imgur.com/jobs
// @exclude *imgur.com/about
// @exclude *imgur.com/apps
// @exclude *imgur.com/tos
// @exclude *imgur.com/privacy
@Nyr
Nyr / gist:5124270
Last active December 14, 2015 17:48
lighttpd rewrite rules for archive-my-tweets
# Rewrite for tweets.nyr.be
$HTTP["host"] =~ "(^|\.)tweets.nyr\.be$" {
url.rewrite-once = (
# Single Tweet
"^/([0-9]+)/?$" => "/index.php?id=$1",
# Tweets by date
"^/archive/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$" => "/index.php?year=$1&month=$2&day=$3",
"^/archive/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)/?$" => "/index.php?year=$1&month=$2&day=$3&page=$4",
"^/archive/([0-9]{4})/([0-9]{2})/?$" => "/index.php?year=$1&month=$2",
"^/archive/([0-9]{4})/([0-9]{2})/page/([0-9]+)/?$" => "/index.php?year=$1&month=$2&page=$3",