Skip to content

Instantly share code, notes, and snippets.

View aksiksi's full-sized avatar
🏠
Working from home

Assil Ksiksi aksiksi

🏠
Working from home
View GitHub Profile
@aksiksi
aksiksi / update_qbit_port.nix
Last active March 1, 2024 23:48 — forked from fizzxed/update_qbit_port.sh
Determine protonvpn port via gluetun and update qbittorrent
{ pkgs, ... }:
let
update-qbittorrent-port = pkgs.stdenv.mkDerivation rec {
name = "update-qbittorrent-port";
src = pkgs.fetchurl {
url = "https://gist.githubusercontent.com/aksiksi/34178962254fb73a8920d8b5e6650f98/raw/7917342ff0088fb58ed829571f7bc3f65108fc31/update_qbit_port.sh";
hash = "sha256-35eodSANzs/ycDPeoy70NhFsgnDOxmJTka/WJ6j6gKY=";
};
dontUnpack = true;
// ==UserScript==
// @name IMDB Score Hider
// @author Assil Ksiksi
// @namespace http://assil.me
// @version 0.4
// @match https://www.imdb.com/*
// @match https://www.imdb.com/
// @description Hides all TV and movie scores from IMDB.
// @copyright 2012+, Assil Ksiksi
// ==/UserScript==
@aksiksi
aksiksi / Setup Nginx and LetsEncrypt for Wordpress (Debian).md
Last active August 16, 2022 00:12
Setup Nginx and LetsEncrypt for Wordpress (Debian)

Prerequisites

Install

# Nginx
sudo apt install nginx

# PHP
sudo apt install php7.3 php7.3-fpm
@aksiksi
aksiksi / README.md
Last active May 29, 2022 17:08
Backup Wordpress DB to Backblaze using rclone

Prerequisites

  1. Install rclone: curl https://rclone.org/install.sh | sudo bash
  2. Setup a new Backblaze B2 target: https://rclone.org/b2/

cron

Install a new crontab to run this script daily:

@aksiksi
aksiksi / README.md
Last active March 17, 2022 18:30
Build gbc using Nix
  1. Install Nix: sh <(curl -L https://nixos.org/nix/install) --no-daemon
  2. nix-build default.nix
@aksiksi
aksiksi / notes.md
Last active November 26, 2021 17:24
Ubuntu Server VM on M1 Mac using UTM/QEMU
@aksiksi
aksiksi / Dockerfile
Last active February 22, 2021 02:29
Fairgame Dockerfile. Ended up scrapping this because Fairgame doesn't work well with non-interactive flows.
FROM ubuntu:20.04
ARG FAIRGAME_REPO=https://github.com/Hari-Nagarajan/fairgame
ARG FAIRGAME_VERSION=0.6.0
ENV FAIRGAME_PASSWORD="changeme"
ENV TZ="America/New_York"
# Clone Fairgame
RUN cd /root/ && git clone --depth 1 --branch $FAIRGAME_VERSION $FAIRGAME_REPO
@aksiksi
aksiksi / _rpi-htpc.md
Last active August 4, 2019 15:20
A docker-compose config that spins up a simple HTPC setup on a Raspberry Pi.

To enable the service: sudo systemctl enable rpi-htpc

To start the service: sudo systemctl start rpi-htpc

Make sure all ports specified in the docker-compose YAML config are available.

Once everything is up, you can configure/restore NZBGet, Sonarr, and Radarr to your liking.

@aksiksi
aksiksi / subset_sum.py
Created November 20, 2017 19:59
A solution to the subset sum problem using a branch-and-bound approach.
"""
Problem:
Given a vector of ints/floats V, find the number of length 3 subsets which have a sum < X.
Assume that V contains no duplicates.
"""
def num_subsets(V, X, N):
global count
count = 0
@aksiksi
aksiksi / aesgcm.go
Last active October 22, 2017 19:55
Encrypt and decrypt a plaintext with AES-GCM in Go. Plaintext is passed in as command line argument.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"os"
)