Skip to content

Instantly share code, notes, and snippets.

@isciurus
isciurus / keybase.md
Created January 22, 2019 23:21
keybase.md

Keybase proof

I hereby claim:

  • I am isciurus on github.
  • I am iscisc (https://keybase.io/iscisc) on keybase.
  • I have a public key ASCNaPKYR_fYHt1n4meJtbYKDSmh45T6vPMvW41rSHuyHwo

To claim this, I am signing this object:

@isciurus
isciurus / MainActivity.java
Last active May 12, 2024 23:45
PoC for Android GoogleAuthUtil.getToken() bug
package com.isciurus.oauth_poc;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Date;
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GoogleAuthUtil;
import com.google.android.gms.auth.UserRecoverableAuthException;
import android.accounts.AccountManager;
import android.app.Activity;
@basoro
basoro / proxmox-proxy
Created May 25, 2019 20:45
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@growlnx
growlnx / CMakeLists.txt
Last active May 12, 2024 23:37
GLIB with cmake
PROJECT(project C)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GLIB REQUIRED glib-2.0)
INCLUDE_DIRECTORIES(
src/include/
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 12, 2024 23:28
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@travisstaloch
travisstaloch / fields.zig
Last active May 12, 2024 23:19
zig iterate over struct fields and print
const std = @import("std");
test "fields" {
const U1s = packed struct {
a: u1,
b: u1,
c: u1,
};
const x = U1s{ .a = 1, .b = 0, .c = 0 };
docker rm --force $(docker ps --all --quiet); docker rmi --force $(docker images --all --quiet); docker volume rm $(docker volume ls --quiet)
#!/usr/bin/env bash
set -eu
DIRNAME="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
PROJECT_ROOT="$(realpath "${DIRNAME}/..")"
@phanect
phanect / neon-setup.md
Last active May 12, 2024 23:13
Personal setup instruction for my KDE neon box

1. Update and install software

sudo pkcon refresh
sudo pkcon update

sudo apt install --ignore-missing \
  curl \
  git \
 kate \
@phanect
phanect / template-script.mjs
Last active May 12, 2024 23:12
JSM (JavaScript modules, aka. ESM) Template for task scripts
import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = fileURLToPath(new URL(".", import.meta.url));