Skip to content

Instantly share code, notes, and snippets.

View qolarnix's full-sized avatar
🐻‍❄️

polarnix qolarnix

🐻‍❄️
View GitHub Profile
@qolarnix
qolarnix / Dockerfile
Created February 29, 2024 04:48
Dockerfile for frankenphp local wp
FROM dunglas/frankenphp:latest-php8.2
# install the PHP extensions we need (https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions)
RUN install-php-extensions \
bcmath \
exif \
gd \
intl \
mysqli \
zip \
@qolarnix
qolarnix / config.conf
Created October 3, 2023 03:15
nginx config linode stackscript
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/landing/public_html;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
@qolarnix
qolarnix / sxhkdrc
Created January 7, 2023 14:23
sxhkdrc
# terminal emulator
super + Return
alacritty
# program launcher
alt + l
rofi -show drun -icon-theme "Breeze" -show-icons
# make sxhkd reload its configuration files:
super + Escape
@qolarnix
qolarnix / bspwmrc
Created January 7, 2023 14:21
bspwm config
#! /bin/sh
# launch sxhkd keybind manager
pgrep -x sxhkd > /dev/null || sxhkd &
# launch script that runs polybar status bar
$HOME/.config/polybar/launch.sh &
# launch gnome polkit for programs that need auth
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
@qolarnix
qolarnix / title
Last active November 27, 2022 18:42
FreeBSD Polybar Module - Curwin (xwindow improved, requires xdotool)
#!/usr/local/bin/php
<?php
/*
* Curwin
* Improved xwindow polybar module with support for custom class names
*/
$wm_desktop = shell_exec('xdotool getwindowfocus 2>/dev/null');
$wm_desktop = preg_replace('/\s+/', '', $wm_desktop);
@qolarnix
qolarnix / drive
Created November 27, 2022 18:39
FreeBSD Polybar Module - Drive
#!/usr/local/bin/php
<?php
$drive_cap_raw = shell_exec('df -h | grep default');
$drive_cap_arr = explode(' ', $drive_cap_raw);
$drive_cap_clean = str_replace(' ', '', $drive_cap_arr[4]);
echo 'Root: '.$drive_cap_clean;
@qolarnix
qolarnix / cpu
Created November 27, 2022 18:39
FreeBSD Polybar Module - CPU
#!/usr/local/bin/php
<?php
$iostat_cpu_usr = shell_exec("iostat -c 2 | awk '{print $12}'");
$iostat_cpu_sys = shell_exec("iostat -c 2 | awk '{print $14}'");
$cpu_usr_arr = explode("\n", $iostat_cpu_usr);
$cpu_sys_arr = explode("\n", $iostat_cpu_sys);
$cpu_usr = intval($cpu_usr_arr[3]);
@qolarnix
qolarnix / battery
Created November 27, 2022 18:38
FreeBSD Polybar Module - Battery
#!/usr/local/bin/php
<?php
// breakpoints for color to change
$bat_high = 71; // 71
$bat_mid = 36; // 36
$bat_low = 0;
// polybar color variables
$blue = '%{F#3A86FF}';

Keybase proof

I hereby claim:

  • I am qolarnix on github.
  • I am polarnix (https://keybase.io/polarnix) on keybase.
  • I have a public key ASDM9cyyliEm9AfM3ZZL77kHntJPd1xz7_tZpZczHDxgIgo

To claim this, I am signing this object:

@qolarnix
qolarnix / gist:2b15d12d4b7ac4fccb766eb9f495dc6d
Last active July 8, 2022 21:01
beeselmane/puredarwin build steps
# clone repo
git clone --recurse-submodules https://github.com/beeselmane/PureDarwin.git
# verbose output
export RC_VERBOSE=YES
# build jobs
export RC_BUILD_JOBS=1
# source