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 / hello.pas
Created March 20, 2016 15:21
Some Free Pascal...
program Hello;
uses sysutils;
// Record syntax
type Book = record
title: string;
author: string;
isbn: string;
end;
@aksiksi
aksiksi / ping-do.py
Last active March 30, 2016 09:31
Simple script to test DigitalOcean's datacenters speed
#!/usr/bin/env python
import subprocess
class SpeedTest(object):
datacenters = [
{
'name': 'NYC1',
'host': 'speedtest-nyc1.digitalocean.com',
'ip': '198.211.112.36',
'location': 'New York, USA',
@aksiksi
aksiksi / keybase.md
Created August 29, 2017 18:22
Keybase proof.

Keybase proof

I hereby claim:

  • I am aksiksi on github.
  • I am aksiksi (https://keybase.io/aksiksi) on keybase.
  • I have a public key ASC5Xk7XO42Q_4mUVJ7PjgnZzGzQHhCSACBaOG3JwmfR4Ao

To claim this, I am signing this object:

@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"
)
@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 / _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 / 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 / notes.md
Last active November 26, 2021 17:24
Ubuntu Server VM on M1 Mac using UTM/QEMU
@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 / 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: