This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # taken from https://github.com/s-zeid/bin/blob/main/display-transparent | |
| """Displays an image without a window border or background. | |
| Based on code from http://bit.ly/qfvule | |
| """ | |
| import argparse | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while true; do cpulimit -p $( while true ; do if [[ ! -z $(pstree -p -a | awk '/chromium-browser/ && !/awk/' | grep -oP "(?<=sh,).*[0-9]+") ]]; then echo "$(pstree -p -a | awk '/chromium-browser/ && !/awk/' | grep -oP "(?<=sh,).*[0-9]+")"; break; fi; sleep 2; done ) -l 60; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| import math | |
| import re | |
| import pytz | |
| import datetime | |
| from datetime import datetime as dt | |
| from datetime import datetime as dtm, time as datetime_time, timedelta | |
| #from _datetime import * | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env lua | |
| conky_color = "${color1}%2d${color}" | |
| t = os.date('*t', os.time()) | |
| year, month, currentday = t.year, t.month, t.day | |
| daystart = os.date("*t",os.time{year=year,month=month,day=01}).wday | |
| month_name = os.date("%B") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S bash -e | |
| # REPO='https://gitlab.gnome.org/GNOME/vte.git' | |
| REPO='https://github.com/GNOME/vte.git' | |
| LIBPATH='/usr/local/lib/x86_64-linux-gnu' | |
| LDCONFPATH='/etc/ld.so.conf' | |
| # See Deps: | |
| # https://github.com/GNOME/vte/blob/master/meson.build | |
| # On Ubuntu 21.04, GNOME-Terminal 3.38.1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rofi -dump-config | |
| configuration { | |
| /* modi: "window,run,ssh";*/ | |
| /* font: "mono 12";*/ | |
| /* location: 0;*/ | |
| /* yoffset: 0;*/ | |
| /* xoffset: 0;*/ | |
| /* fixed-num-lines: true;*/ | |
| /* show-icons: false;*/ | |
| /* terminal: "rofi-sensible-terminal";*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gcc test.c -lX11 -lXext | |
| /* Some clumsy app to test X11 Shape extension. | |
| * | |
| * The app window consists of three zones: | |
| * +-------+ | |
| * | A | | |
| * +---+---+ | |
| * | B | C | | |
| * +---+---+ | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; hello_world.asm | |
| ; | |
| ; Author: John Hammond | |
| global _start | |
| section .text: | |
| _start: | |
| mov eax, 0x4 ; use the write syscall | |
| mov ebx, 1 ; use the stdout as fd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <X11/Xlib.h> | |
| #include <X11/Xatom.h> | |
| #include <X11/Xutil.h> | |
| #include <X11/extensions/shape.h> | |
| #include <X11/extensions/Xfixes.h> | |
| #include <pango/pangocairo.h> | |
| #include <cairo.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #shows the current io usage | |
| function iomonitor { | |
| OLD=`awk '{print $1}' /sys/block/sda/stat` # First field is number of read I/Os processed | |
| DT=1 | |
| for i in /sys/block/sda/stat | |
| do | |
| sleep $DT | |
| NEW=`awk '{print $1}' /sys/block/sda/stat` |