Skip to content

Instantly share code, notes, and snippets.

View vibhavp's full-sized avatar

Vibhav Pant vibhavp

  • New Delhi, India
  • 06:33 (UTC +05:30)
View GitHub Profile
# ~/.config/pipewire/pipewire-pulse.conf
context.spa-libs = {
audio.convert.* = audioconvert/libspa-audioconvert
support.* = support/libspa-support
}
context.modules = [
{ name = libpipewire-module-rt
args = {
nice.level = -11
@vibhavp
vibhavp / schema.json
Last active January 23, 2022 14:40
opentelemetry-collector-contrib schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"receivers",
"exporters",
"service"
],
"properties": {
"receivers": {
"minProperties": 1,
@vibhavp
vibhavp / otelcol-schema.json
Created January 22, 2022 11:56
otelcol-contrib schema prototype
{
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"receivers",
"exporters",
"service"
],
"properties": {
"receivers": {
"minProperties": 1,
@vibhavp
vibhavp / main.go
Created August 28, 2020 10:56
Useage: ./ip http://<domain>/<endpoint>
package main
import (
"encoding/binary"
"fmt"
"log"
"net"
"net/url"
"os"
"strconv"

Keybase proof

I hereby claim:

  • I am vibhavp on github.
  • I am vibhavp (https://keybase.io/vibhavp) on keybase.
  • I have a public key whose fingerprint is 7ED1 D48C 513C A024 BE3A 785F E3FB 28CB 6AB5 9598

To claim this, I am signing this object:

(defun factorial (n)
(let ((i 1)
(fac 1))
(while (/= i (1+ n))
(setq fac (* fac i)
i (+ i 1)))
fac))
(gcc-jit-compile 'factorial nil "factorial1.dot" "factorial.s" 3)
@vibhavp
vibhavp / nwpd.md
Created August 13, 2018 19:35
GSoC 2018 Summary

nwpd is a userspace daemon for the Neighborhood Watch Protocol, an address resolution protocol for XIA. nwpd's consists of 8 main files:

  • config.c: Consists of function for reading configuration files, and command line options, and writing them to the global nwpd_config.

  • log.c: Functions for logging.

  • monitor.c: Implements the monitoring system. The main variable here is hosts_table, a hash table mapping Ethernet addresses to a host_clock

@vibhavp
vibhavp / preprocess.el
Created October 12, 2017 13:06
preprocess.el
(require 'ht)
(defun pp-nan (expr)
(if (symbolp expr)
(if (string-prefix-p "nan" (symbol-name expr))
"nan"
(if (string-prefix-p "-nan" (symbol-name expr))
"-nan"
expr))
expr))
CASE (Bswitch):
{
Lisp_Object jmp_table = POP;
Lisp_Object v1 = TOP;
Lisp_Object dest = Fgethash(v1, jmp_table, Qnil);
if (!NILP(dest)) {
int car = XINT(XCAR(dest));
int cdr = XINT(XCDR(dest));
op = car + (cdr << 8);
goto op_branch;
@vibhavp
vibhavp / readme.md
Last active January 25, 2016 06:54
readme