Skip to content

Instantly share code, notes, and snippets.

View kwilczynski's full-sized avatar
🐧
Have you built a Linux kernel recently?

Krzysztof Wilczyński kwilczynski

🐧
Have you built a Linux kernel recently?
  • Yokohama, Japan
  • 08:43 (UTC +09:00)
View GitHub Profile
import (
"github.com/aelsabbahy/goss/outputs"
"github.com/aelsabbahy/goss/util"
)
func TestUseAsPackage(t *testing.T) {
output := &bytes.Buffer{}
// temp spec file
fh, err := ioutil.TempFile("", "*.yaml")
@zchee
zchee / ANSI.md
Created February 13, 2020 03:31 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@kwilczynski
kwilczynski / test.c
Last active December 17, 2024 16:48
Test for AES NI in the CPU.
#include <stdio.h>
int main (int argc, char **argv)
{
unsigned int eax, ebx, ecx, edx;
asm(
"xchg{l}\t{%%}ebx, %1\n\t" \
"cpuid\n\t" \
"xchg{l}\t{%%}ebx, %1\n\t" \
@kwilczynski
kwilczynski / gist:cc0095d6e8b44698d08c4c6afb1a459b
Last active March 22, 2021 00:22
Muted Twitter words to disable Twitter's spam
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
suggest_grouped_tweet_hashtag
suggest_pyle_tweet
@alexellis
alexellis / expose-apiserver-kubernetes-inlets-pro.md
Last active December 27, 2022 04:10
Get `kubectl` access to your private cluster from anywhere
@naetherm
naetherm / PKGBUILD
Created January 11, 2020 12:18
amdgpu-pro-installer
# Author: Janusz Lewandowski <[email protected]>
# Contributor: David McFarland <[email protected]>
# Maintainer: Andrew Shark <ashark @at@ linuxcomp.ru>
# Autogenerated from AMD's Packages file
major=19.50
minor=967956
pkgbase=amdgpu-pro-installer
pkgname=(
import atexit
import os
import socket
import subprocess
import shlex
import time
import signal
tcpdump_bin = os.popen('which tcpdump').read().strip()
ss_bin = os.popen('which ss').read().strip()
@majek
majek / netstack4netns.go
Last active April 16, 2021 07:07
netstack from gvisor 4 netns
package main
import (
"flag"
"fmt"
"math/rand"
"net"
"os"
"os/signal"
"runtime"
@majek
majek / gvtcpdump.c
Created December 17, 2019 14:46
gVisor tcpdump
/*
* Usage: ./gvtcpdump | tcpdump -n -r -
*/
#include <arpa/inet.h>
#include <errno.h>
#include <error.h>
#include <getopt.h>
#include <linux/filter.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
@kwilczynski
kwilczynski / buckets.txt
Last active July 12, 2024 02:59
Parse S3 URL into bucket, key, region, version ID, etc. Useful when using AWS SDK for Go.
http://s3.amazonaws.com/bucket/key (for a bucket created in the US East (N. Virginia) region)
https://s3.amazonaws.com/bucket/key
http://s3-region.amazonaws.com/bucket/key
https://s3-region.amazonaws.com/bucket/key
http://s3.region.amazonaws.com/bucket/key
https://s3.region.amazonaws.com/bucket/key
http://s3.dualstack.region.amazonaws.com/bucket/key (for requests using IPv4 or IPv6)