Skip to content

Instantly share code, notes, and snippets.

View norpol's full-sized avatar

Phileas Lebada norpol

View GitHub Profile
@imogenkinsman
imogenkinsman / pacman-cheat-sheet.md
Last active October 1, 2020 23:28
How To Use Pacman

This is my first Arch install and I keep forgetting or using unsafe pacman commands, so I made a thing.

Arch's philosophy is to be modular, give you control over everything, and allow you to shoot yourself in the foot every other day until you run out of toes.

This guide is meant to be used as a quick reference and prioritizes safe, sane defaults, but you should read the pacman docs first. They're a quick read, and will save you some pain later.

Pacman and Aur

Pacman only works with official repos - unofficial repos are listed in aur, the Arch Linux Repository. It's common to use yay, a wrapper that allows you to easily use both aur and the official repository:

@chrisdlangton
chrisdlangton / syscall2seccomp.py
Last active August 31, 2022 23:51
Automatically generate seccomp profile json by learning from container activity using sysdig
#!/usr/bin/env python3
import fileinput
import json
import argparse
SECCOMP_PROFILE = ('{"defaultAction": "SCMP_ACT_ERRNO",'
'"architectures": ['
'"SCMP_ARCH_X86_64",'
'"SCMP_ARCH_X86",'
@rixx
rixx / comparison.md
Last active June 10, 2023 22:08
Online man pages comparison

Man page browser comparison

There are a bunch of man page browsers available online. They have different data sources, feature sets, and disadvantages, so here is a short comparison table:

Name ls man page No Trackers/Ads Clickable Headings Links² ToC¹ Local Search Noteworthy
Arch manual pages ls
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
let
privateZeroTierInterfaces = [ "ztbso1b6n3" ]; # ZT NET INTERFACE
in {
system.stateVersion = "19.03";
services.openssh.enable = true;
services.openssh.openFirewall = false; # SSH ONLY ON VPN
services.openssh.passwordAuthentication = false;
networking.firewall.enable = true;
@klingtnet
klingtnet / how-to-upgrade-nvmw-ssd-firmware-on-linux.md
Last active September 16, 2023 23:37
How to upgrade [Lenovo] NVMe SSD firmware on Linux

The instructions were tested on a Lenovo X1 Carbon 5th Gen (X1C5) on Arch Linux but should be applicable to other Lenovo models and Linux distributions.

BACKUP YOUR DATA! I created a bootable Ubuntu Image like this:

$ sudo sh -c 'curl --location --silent --fail "http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso" | pv > /dev/<your-usb-drive>'
# note that pv is only there to show progress, it is perfectly fine to redirect curl to the usb drive directly.

then I booted from this drive by pressing F12 on reboot and dumped my NVMe disk to an external hard drive like this:

@pigeonhill
pigeonhill / 4m.lua
Created May 12, 2018 13:50
EOSM script 4 (ND)
--Neutral Density Script (NDS) Release 0.9M
--[[
********************************************************************************************
This script creates a bracket set for post processing, allowing you to simulate an ND filter.
Also you can use the script to create brackets to 'remove people' ;-)
Change the number of brackets or the time delay (s) between brackets using the MENU and PLAY keys (Green text)
Toggle between these changes with the UP key.
@raphlinus
raphlinus / parse.cu
Created April 23, 2018 19:31
sketch of prefix sum to do backslash unescaping in cuda
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@BjarniRunar
BjarniRunar / gist:bd34c1e2e8101f6ff237add5db43eb78
Last active April 20, 2018 21:11
Backup snapshots, using rsync. CLI user's Time Machine replacement.
#!/bin/bash
#
# Backup scriptlet. Public Domain. Made by Bjarni, https://bre.klaki.net/
#
# This will look in any device mounted on /media/$USER/, and if it has a directory
# named home-00000000 or data-00000000, it will use one of two rsync-based strategies
# to create a backup snapshot. To start using new media, just create one of those
# directories and run the script.
#
# I have two strategies because some of my backup disks are too small for my "Data"
@pigeonhill
pigeonhill / ndb.lua
Last active September 25, 2018 23:39
--Neutral Density Script (NDS) Release 0.95
--[[
********************************************************************************************
This script creates a bracket set for post processing, allowing you to simulate an ND filter.
Also you can use the script to create brackets to 'remove people' ;-)
Change the number of brackets or the time delay (s) between brackets using the MENU and INFO keys (Green text)
Toggle between these changes with the INFO key.