Skip to content

Instantly share code, notes, and snippets.

View hadret's full-sized avatar

Filip Chabik hadret

View GitHub Profile
@hadret
hadret / fold-me-please.md
Created October 12, 2023 10:18
I ain't easily foldable, am I?
@hadret
hadret / .zshrc
Created July 5, 2023 19:36
Go-Dark, Go-Light
# setup OS
local os="$(uname)"
case $os in
Darwin)
# iTerm2 auto-Darkmode
local val=$(defaults read -g AppleInterfaceStyle 2>/dev/null)
if test ! -n "$val"; then
export ITERM_PROFILE="Default"
else
@hadret
hadret / smartmon.sh
Created December 18, 2020 15:57
smartmon.sh script adapted for FreeBSD
#!/usr/bin/env bash
# Script informed by the collectd monitoring script for smartmontools (using smartctl)
# by Samuel B. <samuel_._behan_(at)_dob_._sk> (c) 2012
# source at: http://devel.dob.sk/collectd-scripts/
# TODO: This probably needs to be a little more complex. The raw numbers can have more
# data in them than you'd think.
# http://arstechnica.com/civis/viewtopic.php?p=22062211
# Formatting done via shfmt -i 2
@hadret
hadret / list_all_the_things.py
Created June 23, 2019 07:11
Simple list transformation
# -*- coding: utf-8 -*-
things1 = ['one', 'two', 'three', 'four'] # list of things
things2 = ['-a ' + s for s in things1] # list comprehension
cmd = 'command that needs flags ' + ' '.join(s for s in things2)
print(cmd)
@hadret
hadret / .cvimrc
Created June 8, 2017 10:41
cVim Configuration
set nohud
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
let hintcharacters = "asdghjkl;"
let defaultengine = "duckduckgo"

Keybase proof

I hereby claim:

  • I am hadret on github.
  • I am hadret (https://keybase.io/hadret) on keybase.
  • I have a public key whose fingerprint is 3637 EE58 8760 A832 6A43 E02A CB84 7CE6 C5E0 EE3F

To claim this, I am signing this object: