Skip to content

Instantly share code, notes, and snippets.

@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));
@braindevices
braindevices / #btrfs benchmark for daily used desktop OS
Last active May 12, 2024 23:05
which file sytem to use for daily work? should we turn on btrfs compression?
#btrfs benchmark for daily used desktop OS
@FermiDirak
FermiDirak / NYTPaywallWorkaround.md
Created May 19, 2019 03:44
Steps to get around NYT Paywall

A step by step guide wallthrough on how to access / read a NYT paywalled article

  1. Open the NYT article you want to read in incognito mode
  2. Open up your devtool console ([cmd][shift][j] on chrome/mac)
  3. Open up the devtools command prompt ([cmd][shift][P] on chrome/mac)
  4. Type in the command disable javascript into the command prompt, but don't hit enter
  5. Reload the page
  6. After the content loads but before the paywall appears, enter your disable javascript command
  7. If paywall persists, return to step 3. Otherwise, enjoy your free article.
  8. Happy reading!