Skip to content

Instantly share code, notes, and snippets.

View bobby285271's full-sized avatar
🙈
Playing Gakumas

Bobby Rong bobby285271

🙈
Playing Gakumas
View GitHub Profile
@lbland94
lbland94 / perfect-circle.sh
Created February 15, 2024 20:15
Basic premise to draw a perfect circle via bash
#!/bin/bash
# Requires xdotool
# cx and cy are the center coordinates around which the circle will be drawn
# r is the radius of the circle
# time is how long the circle will take to draw
# steps is how many steps the circle will be drawn in
r=400
cx=$(echo "2560 + 1920 / 2 + 0.2" | bc -l)
cy="578.5"
@luochen1990
luochen1990 / Dockerfile
Last active March 8, 2022 16:26
Docker devbox for NixOS users who want a FHS linux environment
#!/usr/bin/env -S bash -c 'docker build -t devbox --build-arg USER_ID=$(id -u) --build-arg USER_NAME=$(id -un) --build-arg GROUP_ID=$(id -g) --build-arg GROUP_NAME=$(id -gn) $(realpath $(dirname $0))'
FROM ubuntu:20.04
ARG USER_ID
ARG USER_NAME
ARG GROUP_ID
ARG GROUP_NAME
RUN addgroup --gid $GROUP_ID $GROUP_NAME; exit 0
@izackwu
izackwu / Adblock Plus Filter Rules
Last active July 15, 2022 01:53
Better Caixin Weekly | 更好的财新周刊网页版阅读体验
weekly.caixin.com##.xiangguan
weekly.caixin.com##.f_ri
weekly.caixin.com##.weixinmedia
weekly.caixin.com##.rssBox
weekly.caixin.com##.funcri01
weekly.caixin.com##.fenxiangRig
weekly.caixin.com##.conri
weekly.caixin.com##.fenghui_code
weekly.caixin.com##.multimedia
weekly.caixin.com##.copyright
{ stdenv, lib, fetchFromGitHub, systemd, libinput, pugixml, cairo, xorg, gtk3-x11, pcre, pkg-config, cmake }:
stdenv.mkDerivation rec {
pname = "touchegg";
version = "2.0.10";
src = fetchFromGitHub {
owner = "JoseExposito";
repo = pname;
rev = version;
sha256 = "18v3i0wjkhqxjdkw188r7y2bnr9rj37ri5xnkwibs12y14hbs9n6";
@ouuan
ouuan / take-a-break.sh
Last active May 1, 2021 02:55
Take a break from your Xorg session
#!/bin/bash
# In <duration> seconds, if you have been unlocked for more than <permit> seconds, you'll be locked;
# if you have been unlocked for more than <warning> seconds, you'll be asked to lock every <dialoginterval> seconds.
# The stats are saved at <file>.
duration=3600
permit=3200
warning=2800
dialoginterval=180
@karuboniru
karuboniru / podman qq setup
Last active October 10, 2021 01:47
Podman QQ
podman run --name qq \
--device /dev/snd --net=host --ipc=host \ # remove net=host if you don't want this
--device=/dev/dri/card0:/dev/dri/card0 \
--device=/dev/dri/renderD128:/dev/dri/renderD128 \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v ${XDG_RUNTIME_DIR}/pulse/native:/run/user/0/pulse/native \
-e PULSE_SERVER=unix:/run/user/0/pulse/native \
-v $HOME/containerhome:/root:Z \ # choose a path you like, same for following
-v $HOME/containerhome/TencentFiles:/TencentFiles:Z \
-v $HOME/文档/Fonts:/usr/share/fonts/Windows:Z \ # external fonts, any path in /usr/share/fonts will be fine
@looselyrigorous
looselyrigorous / 99-gdm-use-materia-theme.hook
Last active June 3, 2023 10:12
Pacman hook to replace GDM shell theme with Materia-compact
[Trigger]
Operation = Upgrade
Type = Package
Target = gnome-shell
[Action]
Description = Replace GDM theme with Materia-compact
When = PostTransaction
Exec = /usr/bin/sh -c "cd /usr/share/themes/Materia-compact/gnome-shell && glib-compile-resources --target=/usr/share/gnome-shell/gnome-shell-theme.gresource gnome-shell-theme.gresource.xml"
Depends = materia-gtk-theme