Skip to content

Instantly share code, notes, and snippets.

View patrick96's full-sized avatar

Patrick Ziegler patrick96

View GitHub Profile
#include <arpa/inet.h>
#include <assert.h>
#include <ifaddrs.h>
#include <linux/if_link.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
[bar/example]
modules-left = ewmh
[module/ewmh]
type = internal/xworkspaces
pin-workspaces = false
enable-click = true
enable-scroll = false
; vim:set ft=dosini:
[bar/example]
modules-left = text
font-0 = xos4 Terminus:style=Regular:size=14
font-1 = xos4 Terminus:style=Bold:size=14
[module/text]
type = custom/text
content = Text%{T2}Text
[bar/example]
modules-left = xkeyboard
[module/xkeyboard]
type = internal/xkeyboard
label-indicator-on = %name%
label-indicator-on-foreground = #ff0000
label-indicator-on-background = #00ffff
[bar/example]
modules-right = text
enable-ipc = true
fixed-center = true
tray-position = right
tray-padding = 400
# Maintainer: linduxed <linduxed at protonmail dot com>
# Contributor: Faerbit <faerbit at gmail dot com>
_pkgname=exercism
pkgname="${_pkgname}-bin"
pkgver=3.0.13
pkgrel=1
pkgdesc="Command line client for exercism.io"
arch=("i686" "x86_64")
url="https://github.com/exercism/cli"
@patrick96
patrick96 / gdb
Created March 1, 2019 16:37
thread apply all where
Thread 5 (Thread 0x7ffff23fa700 (LWP 11364)):
#0 0x00007ffff6355edc in __lll_lock_wait () from /usr/lib/libpthread.so.0
#1 0x00007ffff634f298 in pthread_mutex_lock () from /usr/lib/libpthread.so.0
#2 0x0000555555938ba4 in __gthread_mutex_lock (__mutex=0x555555c6f188) at /usr/include/c++/8.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:748
#3 0x0000555555938e98 in std::mutex::lock (this=0x555555c6f188) at /usr/include/c++/8.2.1/bits/std_mutex.h:103
#4 0x0000555555940924 in std::lock_guard<std::mutex>::lock_guard (this=0x7ffff23f9548, __m=...) at /usr/include/c++/8.2.1/bits/std_mutex.h:162
#5 0x00005555559d7697 in polybar::modules::module<polybar::modules::battery_module>::get_output[abi:cxx11]() (this=0x555555c6ef80) at /home/patrick96/Projects/github.com/DanielChabrowski/polybar/include/modules/meta/base.inl:123
#6 0x00005555559d7234 in polybar::modules::module<polybar::modules::battery_module>::contents[abi:cxx11]() (this=0x555555c6ef80) at /home/patrick96/Projects/github.com/DanielChabrowski/polybar/inc
#---- Generated by tint2conf 2641 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
#-------------------------------------
# Panel
panel_items = FS
panel_size = 100% 19
panel_margin = 5 0
panel_padding = 0 0 0
diff --git a/drtest.py b/drtest.py
index 66f75f5..ffb1656 100755
--- a/drtest.py
+++ b/drtest.py
@@ -296,7 +296,7 @@ class NetworkTopology:
#nextHopRouter = -1 is correct iif the subnet is not reachable
if nextHopRouter == -1:
- if theoretical_dist == -1:
+ if theoretical_dist == -1 or theoretical_dist >= 16:
@patrick96
patrick96 / boomaga-PKGBUILD.sh
Last active May 6, 2018 11:25
Fixed boomaga PKGBUILD for v1.3.0
# Contributer: giacomogiorgianni@gmail.com
pkgname=boomaga
pkgver=1.3.0
pkgrel=1
pkgdesc="Is a virtual printer for viewing a document before printing it out using the physical printer"
arch=('i686' 'x86_64')
url="https://github.com/Boomaga/boomaga"
license=('LGPL')
depends=('kdebase-runtime' 'ghostscript' 'snappy' 'poppler>=0.58')