Skip to content

Instantly share code, notes, and snippets.

View joar's full-sized avatar
:bowtie:
Not wearing a bowtie

Joar Wandborg joar

:bowtie:
Not wearing a bowtie
View GitHub Profile
@joar
joar / jq-insert-var.sh
Last active May 3, 2024 13:41
Add a field to an object with JQ
# Add field
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}'
# {
# "hello": "world",
# "foo": "bar"
# }
# Override field value
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}'
{
@joar
joar / donate-bitcoin.html
Last active September 27, 2023 07:48
Quick and dirty bitcoin donation button, as seen on https://gobblin.se
<style>
.donate-button {
text-align: center;
}
.donate-button .bitcoin-address {
font-size: 1.5em;
}
</style>
<div class="donate-button">
#include <dlfcn.h>
#include <syslog.h>
#include <stdio.h>
#include <unistd.h>
typedef struct FCC_OPS FCC_OPS;
typedef void *HDMOVERMBIMTOSARHANDLE;
typedef int BOOL;
@joar
joar / README.rst
Last active March 21, 2022 06:30
Using unicode in your SSID on ASUS RT-AC66U, in ASUSWRT

Using unicode in your SSID on ASUS RT-AC66U

Danger

This might void your warranty. Do it on your own risk.

I'm using the 🐟 emoji character as my SSID, because I like to be special.

How I do it

@joar
joar / README.md
Created May 10, 2015 22:16
Accessing MSI Afterburner remote server manually

Where $ip and $port are your MSI Afterburner Remote Server's IP address and port:

  • Go to $ip:$port/mahm, you will be presented with a HTTP Basic Auth dialog.
  • Enter MSIAfterburner as the username.
  • Enter your security key as the password.

Profit! You'll get an XML file that looks something like the attached xml-example.xml.

@joar
joar / 1-base.html
Last active September 27, 2021 11:32
Multiple and extending base templates in Django
<html>
<head>
<title>Foo</title>
</head>
<body>
<header>
{% block header %}
<h1>Lorem ipsum</h1>
{% endblock %}
</header>
@joar
joar / .tmux.conf
Created September 15, 2015 13:30
tmux: Enable mouse scrolling, windown and pane select. Also provides a binding to disable/enable mouse for copy/pase.
# mouse-mode
set-window-option -g mode-mouse on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
bind m \
set -g mode-mouse on \;\
#SingleInstance, Force
#KeyHistory, 0
SetBatchLines, -1
ListLines, Off
;SendMode Input ; Forces Send and SendRaw to use SendInput buffering for speed.
; SetTitleMatchMode, 3 ; A window's title must exactly match WinTitle to be a match.
SetWorkingDir, %A_ScriptDir%
SplitPath, A_ScriptName, , , , thisscriptname
#MaxThreadsPerHotkey, 1 ; no re-entrant hotkey handling
; DetectHiddenWindows, On
settings
{
main
{
Description: "READ ME! Call of Duty Zombies! Gain points by dealing damage and getting kills. Spend points on buyable items around the map. Don't worry about the timer, it'll reset once it hits 0. Controls: M&KB: Buy Item: Hold (Interact). Switch Hero: Tap (Interact). Controller: Buy Item: Hold (Reload). Switch Hero: Tap (Ultimate). Use Ultimate: Hold (Ultimate). Made by APM."
}
lobby
{
Map Rotation: Paused
@joar
joar / Eichenwalde Zombies.ow
Last active March 10, 2020 17:25
Overwatch Workshop mode: "COD Zombies" on eichenwalde
settings
{
lobby
{
Max Spectators: 12
Max Team 2 Players: 0
}
modes
{