This file contains 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
<?php | |
$timezone = `timedatectl`; | |
$volume = `pactl get-sink-volume @DEFAULT_SINK@`; | |
$mute = `pactl get-sink-mute @DEFAULT_SINK@`; | |
$brightnessCurrent = `brightnessctl get`; | |
$brightnessMax = `brightnessctl max`; | |
$battery = `cat /sys/class/power_supply/BAT0/capacity`; | |
$timezone = preg_match('%Time zone: ([\w/]+)%', $timezone, $matches); |
This file contains 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
docker-prune () { | |
for CMD in "$@" | |
do | |
echo "Pruning ${CMD}s..." | |
IDS=$(docker $CMD ls --all --quiet 2> /dev/null || docker $CMD ls --quiet) | |
[ -z "$IDS" ] && echo "None found." && continue | |
echo "$IDS" | xargs -L1 docker $CMD rm --force | |
docker $CMD prune --force | |
done | |
} |
This file contains 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
eval $(ssh-agent -s) 1> /dev/null | |
export USER_ID=$(id --user) | |
export GROUP_ID=$(id --group) | |
export DENO_DIR="$HOME/.deno" | |
PATH="$PATH:$HOME/.npm/bin" | |
alias nixos-clean="sudo nix-collect-garbage --delete-old" | |
alias nixos-list="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system" | |
alias dpa="dprune container volume network" |
This file contains 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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, lib, ... }: | |
let | |
unstablePkgs = import <unstable> { config = config.nixpkgs.config; }; | |
defaultLocale = "en_US.UTF8"; | |
defaultEditor = "nvim"; |
This file contains 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
set ideajoin | |
set ignorecase | |
set smartcase | |
let mapleader = "," | |
let localmapleader = "," | |
map <leader>cr <Action>(RenameElement) | |
map <leader>ca <Action>(ShowIntentionActions) | |
map <leader>/ <Action>(CommentByLineComment) |
This file contains 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
# Internet access | |
################# | |
iwctl station list # list devices | |
NET_DEVICE="MyDevice" | |
iwctl station $NET_DEVICE scan | |
iwctl station $NET_DEVICE get-networks # list networks | |
NET_NAME="MyNetwork" | |
NET_PASS="MyPassword" | |
iwctl --passphrase $NET_PASS station $NET_DEVICE connect $NET_NAME |
This file contains 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/bash | |
if [ "$#" -ne 2 ]; then | |
echo "Incorrect number of arguments." | |
exit 1 | |
fi | |
BRANCH=$1 | |
URL="https://github.com/SamuelDavis/templates/archive/refs/heads/$BRANCH.zip" | |
TEMP_FILE="/tmp/templates-$BRANCH.zip" |
This file contains 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
set title | |
" Styling | |
syntax on | |
colorscheme slate | |
" Search | |
set incsearch " incrementally highlight search while typing | |
" Sidebar |
This file contains 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
import { | |
addComponent, | |
addEntity, | |
createWorld, | |
defineComponent, | |
defineQuery, | |
type ComponentType, | |
type IWorld, | |
Types, | |
type ISchema, |
This file contains 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
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "Left", function() | |
local win = hs.window.focusedWindow() | |
local f = win:frame() | |
local screen = win:screen() | |
local max = screen:frame() | |
f.x = max.x | |
f.y = max.y | |
f.w = max.w / 2 | |
f.h = max.h |
NewerOlder