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 / 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 (
// rust rmsbolt starter file
// Local Variables:
// rmsbolt-command: "rustc -C opt-level=0"
// rmsbolt-disassemble: nil
// End:
fn is_rms(a: char) -> i32 {
match a {
'R' => 1,
@zerosign
zerosign / output.txt
Last active September 17, 2020 00:58
psql (12.4, server 9.5.0)
Type "help" for help.
sample=# create table sample (id integer, metadata jsonb) ;
CREATE TABLE
sample=# insert into sample values (1, '{"test" : { "test" : 1 }}'::jsonb);
INSERT 0 1
sample=# select * from sample;
id | metadata
----+-----------------------