Skip to content

Instantly share code, notes, and snippets.

rosco-pc /
Last active February 16, 2024 19:11

Unifi AP useful commands

using SSH:

  • log in to AP: $ ssh ubnt@<IP>
  • default username & password: ubnt & ubnt


Command Example Function
linuxgemini / whois.erl
Last active September 26, 2021 02:22
View whois.erl
%% Simple(?) WHOIS Client in Erlang
%% Copyright 2020 İlteriş Yağıztegin Eroğlu (linuxgemini) <>
%% SPDX-License-Identifier: AGPL-3.0-or-later
egernst /
Created March 4, 2020 17:51 — forked from krsna1729/
ipmi serial over lan sol


Install IPMItools using your package manager on laptop and target machine. Load the drivers on the target.

modprobe ipmi_devintf
modprobe ipmi_si

If you see the following, drivers are not loaded.

nh2 / nixos-rootfs.nix
Last active January 10, 2024 18:43
Example of how to build a NixOS root file system
View nixos-rootfs.nix
# Build with:
# NIX_PATH=nixpkgs=$HOME/src/nixpkgs nix-build --no-link '<nixpkgs/nixos>' -A -I nixos-config=thisfile.nix
# You can also use
# -A
# to build something you can browse locally (that uses symlinks into your nix store).
{config, pkgs, ...}:
# We need no bootloader, because the Chromebook can't use that anyway.
boot.loader.grub.enable = false;
tazjin /
Last active February 28, 2024 12:05
Nix builder for Kubernetes
fay59 / Quirks of
Last active January 23, 2024 04:24
Quirks of C
View Quirks of

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope []

struct foo {
   struct bar {
 int x;
Mnkai /
Last active February 14, 2024 00:57
TDP and turbo parameter modification with MSR on non-overclockable Intel CPU (such as Intel i7-8550U)

TDP and turbo parameter modification with MSR on non-overclockable CPU


  • MSR modification may void your CPU's (or system board's) warranty. Proceed with care. I'm not responsible for any destruction caused by this article.
  • MSR address (greatly) differs from CPU to CPU. Check your own CPU's MSR address using Intel's documentation.
  • Only tested on Intel i7-8550U (Kaby Lake R).
  • This article is translation of this article. If you can understand Korean, I recommend reading that article, not this.


sscotth / keystroke the clipboard extended.workflow
Last active January 2, 2024 12:12
Paste as keystrokes (macOS)
View keystroke the clipboard extended.workflow
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
Brainiarc7 /
Last active February 22, 2024 21:46
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

memoz / sjis-emoticons.txt
Created March 7, 2016 05:23
Randomly collected Shift-JIS emoticons
View sjis-emoticons.txt
╮( ̄▽ ̄)╭
╮( ̄▽ ̄")╭