Skip to content

Instantly share code, notes, and snippets.

View mitjafelicijan's full-sized avatar
🥌
Hi Bob!

Mitja Felicijan mitjafelicijan

🥌
Hi Bob!
View GitHub Profile
@mitjafelicijan
mitjafelicijan / feeds.opml
Created July 5, 2023 20:59 — forked from Josh-Tucker/feeds.opml
HN User Blogroll OPML
<?xml version='1.0' encoding='utf-8'?>
<opml version="1.0">
<head />
<body>
<outline text="https://xeiaso.net" type="rss" xmlUrl="https://xeiaso.net/blog.rss" />
<outline text="https://fasterthanli.me/" type="rss"
xmlUrl="https://fasterthanli.me/index.xml" />
<outline text="https://matt-rickard.com" type="rss" xmlUrl="/rss/" />
<outline text="https://jmmv.dev/" type="rss" xmlUrl="/feed.xml" />
<outline text="https://paulstamatiou.com" type="rss"
@mitjafelicijan
mitjafelicijan / wowtga2png.sh
Last active May 6, 2023 23:56
Converts WoW TGA screenshots to PNG after Lutris is closed
#!/usr/bin/env bash
# Instructions
# - Copy contents of this script to a file `wowtga2png.sh`.
# - Make the script executable with `chmod +x wowtga2png.sh`.
# - Check that the paths of WOW_DIR and OUT_DIR are correct and use absolute paths for directories.
# - In Lutris:
# - Click on the game and select "Configure".
# - Toggle "Advance" in the dialog that just popped up.
# - Go to "System Options" tab and scroll down to "Post-exit script".
@mitjafelicijan
mitjafelicijan / spartan-2.0.0-boilerplate.html
Last active November 30, 2019 13:50
Spartan UI Kit 2.0.0 Boilerplate
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Spartan UI Kit</title>
@mitjafelicijan
mitjafelicijan / provision_s3.sh
Created February 2, 2019 19:47
Provision VM for S3 access
# replace IP with the ip of your newly created droplet
ssh root@IP
# this will install utilities for mounting storage objects as FUSE
apt install s3fs
# we now need to provide credentials (access key we created earlier)
# replace KEY and SECRET with your own credentials but leave the colon between them
# we also need to set proper permissions
echo "KEY:SECRET" > .passwd-s3fs
@mitjafelicijan
mitjafelicijan / bottlepy_redirect.py
Created February 2, 2019 18:35
Python Bottlepy redirect with caching fix
# python ➜ bottlepy web micro-framework
response = bottle.HTTPResponse(status=302)
response.set_header("Cache-Control", "no-store, no-cache, must-revalidate")
response.set_header("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
response.set_header("Location", url)
return response
@mitjafelicijan
mitjafelicijan / caching_nginx.conf
Created February 2, 2019 18:33
Cache config for Nginx
# nginx ➜ /etc/nginx/sites-available/default
location /static/ {
alias /path-to-static-content/;
autoindex off;
charset utf-8;
gzip on;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
location ~* \.(ico|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ {
expires 1y;
add_header Pragma public;
@mitjafelicijan
mitjafelicijan / docker-clean.sh
Last active October 4, 2019 18:19
Stop and clean all Docker containers/images
#!/bin/bash
# stop all containers
docker stop $(docker ps -q)
# delete all containers
docker rm $(docker ps -a -q)
# delete all images
docker rmi $(docker images -q)
@mitjafelicijan
mitjafelicijan / compile-redis-portable.sh
Created January 15, 2018 20:21
Creates portable version of Redis (Linux)
#!/bin/sh
# http://download.redis.io/releases/
# Usage: sh compile-redis-portable.sh
VERSION="4.0.6"
INIT_PATH=`dirname "$0"`
INIT_PATH=`( cd "$INIT_PATH" && pwd )`