Skip to content

Instantly share code, notes, and snippets.

@rosco-pc
rosco-pc / unifi.md
Last active February 16, 2024 19:11
Unifi commands.md
View unifi.md

Unifi AP useful commands

using SSH:

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

Generic

Command Example Function
@linuxgemini
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) <new-iwhois@linuxgemini.space>
%% SPDX-License-Identifier: AGPL-3.0-or-later
-module(whois).
-export([query_iana/1,
query_ripe/1,
query_arin/1,
query_afrinic/1,
query_apnic/1,
@egernst
egernst / ipmi-sol.md
Created March 4, 2020 17:51 — forked from krsna1729/ipmi-sol.md
ipmi serial over lan sol
View ipmi-sol.md

Pre-requisites

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
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 config.system.build.tarball -I nixos-config=thisfile.nix
# You can also use
# -A config.system.build.toplevel
# 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
tazjin / thoughts.md
Last active February 28, 2024 12:05
Nix builder for Kubernetes
View thoughts.md
@fay59
fay59 / Quirks of C.md
Last active January 23, 2024 04:24
Quirks of C
View Quirks of C.md

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 [https://godbolt.org/g/Rh94Go]

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

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

Disclaimer

  • 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.

Start

@sscotth
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
Brainiarc7 / skylake-tuning-linux.md
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.
View skylake-tuning-linux.md

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
memoz / sjis-emoticons.txt
Created March 7, 2016 05:23
Randomly collected Shift-JIS emoticons
View sjis-emoticons.txt
_(:」∠)_
_(:_」∠)_
_(:з」∠)_
_(:зゝ∠)_
╮( ̄▽ ̄)╭
╮( ̄▽ ̄")╭
╮(╯▽╰)╭
(*・ω・)✄╰ひ╯
╮(╯_╰)╭
(ˉ﹃ˉ)