Skip to content

Instantly share code, notes, and snippets.

View zerosign's full-sized avatar
🏠
Working from home

zerosign zerosign

🏠
Working from home
View GitHub Profile
@zerosign
zerosign / config
Created April 3, 2014 03:49
i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#!/usr/bin/env zsh
function usage() {
cat <<EOF
USAGE i3-xephyr start|stop|restart|run
start Start nested i3 in xephyr
stop Stop xephyr
restart reload i3 in xephyr
run run command in nested i3
EOF
@zerosign
zerosign / trace_udp_rcvbuferrors.bt
Created June 4, 2022 08:51 — forked from Quentin-M/trace_udp_rcvbuferrors.bt
trace_udp_rcvbuferrors.bt
// Tracks the origin of net_udp_rcvbuferrors, printing socket metadata associated with the packet drops.
//
// usage: bpftrace trace_udp_rcvbuferrors.bt
// sample output:
// 12:32:25 iperf3/3391 ::ffff:192.168.60.3:5201 -> ::ffff:192.168.60.1:50512 retval=-1 dropped=23809 qlen=36 qsize/qmaxsize=213248/212992 bytes
kprobe:udp_queue_rcv_skb
{
$sock = (struct sock *)arg0;
if ($sock->sk_type != SOCK_DGRAM || ($sock->__sk_common.skc_family != AF_INET && $sock->__sk_common.skc_family != AF_INET6)) {
Chains of recurrences -- a method to expedite the evaluation of closed-form functions
On computational properties of chains of recurrences
Symbolic Evaluation of Chains of Recurrences for Loop Optimization
Efficient Symbolic Analysis for Optimizing Compilers
Using the chains of recurrences algebra for data dependence testing and induction variable substitution
void __cdecl main_main()
{
__int64 *v0; // rdi
__int64 v1; // rdi
__int64 v2; // rax
__int64 v3; // rax
__int64 v4; // rcx
const char *v5; // rdx
__int128 v6; // rax
__int64 v7; // rcx
@zerosign
zerosign / WaylandUbuntu19.10-AppTitle
Last active July 11, 2021 15:31 — forked from rbreaves/WaylandUbuntu19.10-AppTitle
Grab wmclass name or Window Name/Title under Wayland with Gnome 3.x
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval "global.get_window_actors().filter(a=>a.meta_window.has_focus()===true)[0]?.get_meta_window()?.get_wm_class()"
@zerosign
zerosign / emulator-install-using-avdmanager.md
Created February 28, 2021 12:38 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

type Hasher interface {
Compute(
context.Context,
hash Hash,
new map[string]string,
) (Hash, error)
}
type Changeset interface {
Change(
// -*- mode:go;mode:go-playground -*-
// snippet of code @ 2020-11-14 14:23:30
// === Go Playground ===
// Execute the snippet with Ctl-Return
// Provide custom arguments to compile with Alt-Return
// Remove the snippet completely with its dir and all files M-x `go-playground-rm`
package main
import (