Skip to content

Instantly share code, notes, and snippets.

@samjaninf
samjaninf / regex.custom.pm
Created June 19, 2024 02:58 — forked from ethanpil/regex.custom.pm
Custom regex rules for CSF/LFD and NginX plus Wordpress fail2ban plugin
#!/usr/bin/perl
###############################################################################
# Copyright 2006-2015, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
sub custom_line {
my $line = shift;
my $lgfile = shift;
@samjaninf
samjaninf / rust-command-line-utilities.markdown
Created May 14, 2024 00:24 — forked from sts10/rust-command-line-utilities.markdown
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@samjaninf
samjaninf / tag_sonarr_radarr_media_with_overseer_users.py
Created January 4, 2024 07:00 — forked from HStep20/tag_sonarr_radarr_media_with_overseer_users.py
This script will read your Overseer data and create/apply user tags to all of your sonarr/radarr instances
"""
This script will read your Overseer data and create/apply user tags to all of your sonarr/radarr instances, then create a filter in each connected -arr application for the users you specify.
It is forward compatible with the future User Tagging feature of overseer, and formats the tag in the same 'id - lowercase username' pattern Overseer will
It only uses built in python libraries, so you should be able to download and run without much hassle.
NOTE: YOU ARE REQUIRED TO USE IP:PORT CONNECTIONS FOR YOUR SONARR/RADARR INSTANCES INSIDE OF OVERSEERR
This will NOT utilize docker-compose style hostnames at the moment, and I don't use them personally, so I don't see myself adding them
Steps to use:
Resources marked with > are used, have been used, or are actively advocated in the threads. This applies for everything in the [Necessities] section.
[Necessities]
Hiragana & Katakana: http://www.realkana.com/
Kanji: http://kanjidamage.com/
Japanese IME: http://www.google.com/intl/ja/ime/
Anki Flashcards: http://ankisrs.net/
Genki (↓Bottom↓)
Tae Kim Japanese: http://www.guidetojapanese.org/learn/grammar
@samjaninf
samjaninf / Caddyfile
Created June 22, 2021 21:59 — forked from SkYNewZ/Caddyfile
Example Caddyfile for using as load balancer
{
# Enable Debug mode
debug
# Disable admin API
admin off
}
localhost {
# https://caddyserver.com/docs/caddyfile/directives/push
@samjaninf
samjaninf / .htaccess
Created December 5, 2019 03:51 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://andreas-hecht.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@samjaninf
samjaninf / gist:264892101edb63ed0b7bddfa44860d2c
Created October 23, 2019 21:09 — forked from vicalloy/gist:4603625
[coffeescript] maze generator
fmtTime = (t) ->
d = new Date(null);
d.setSeconds(t/1000);
return d.toTimeString().substr 3, 5
move = (obj, direction, step) ->
if !step?
step = 10
attr = 'left'
@samjaninf
samjaninf / webhook.py
Created October 23, 2019 21:09 — forked from vicalloy/webhook.py
Github event handler
from bottle import abort
from bottle import post
from bottle import request
from bottle import run
from subprocess import call
def handle_pull_request(o):
pass
@samjaninf
samjaninf / gist:79576c477cfad153e230695b2ac93747
Created October 23, 2019 21:07 — forked from vicalloy/gist:4593240
[python] maze generator
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import random
try:
from tkinter import *
except ImportError:
from Tkinter import *
class Block(object):