Skip to content

Instantly share code, notes, and snippets.

View Omnikron13's full-sized avatar

Joey Sabey Omnikron13

View GitHub Profile
@Omnikron13
Omnikron13 / uptime-short.fish
Created December 19, 2019 04:53
Condensed uptime output for, e.g, status bars etc.
# Prints out a much more condensed output than the uptime command, intended for
# use in things like status bars where space is a big restriction.
function uptime-short
# Extract a single unit (minutes/hours/days/weeks) from 'uptime -p' string
# Arguments: uptime string, unit to extract
function extract
# 'uptime -p' omits units entirely if they are 0...
set -l X (string match --regex "\d+(?= $argv[2])" "$argv[1]")
# ...so we have to put the actual 0 back in if we want to do maths
if test $X
@Omnikron13
Omnikron13 / cidr.regex
Last active September 16, 2019 05:07
Anal CIDR Regex
^(?:(?:\d|[1-9]\d|1\d{2}|2[0-4]\d+|25[0-5])\.){3}(?:\d|[1-9]\d|1\d{2}|2[0-4]\d+|25[0-5])(?:\/(?:[0-9]|[1-2]\d|3[0-2]))?$
@Omnikron13
Omnikron13 / PKGBUILD
Created August 23, 2019 15:38
solarc-solid-gtk-theme PKGBUILD file
# Maintainer: Joey Sabey <joey.sabey@gmx.com>
pkgname=solarc-solid-gtk-theme
_reponame=solarc-theme
_pkgname=${_reponame}-solid
_pkgauthor=schemar
pkgver=2.0.0
pkgrel=1
pkgdesc="A flat theme without transparent elements. Based on the Arc theme: https://github.com/NicoHood/arc-theme"
arch=('any')
@Omnikron13
Omnikron13 / PKGBUILD
Created August 23, 2019 15:36
solarc-gtk-theme PKGBUILD file
# Maintainer: Joey Sabey <joey.sabey@gmx.com>
pkgname=solarc-gtk-theme
_reponame=solarc-theme
_pkgname=${_reponame}
_pkgauthor=schemar
pkgver=2.0.0
pkgrel=1
pkgdesc="A flat theme with transparent elements. Based on the Arc theme: https://github.com/NicoHood/arc-theme"
arch=('any')
@Omnikron13
Omnikron13 / PKGBUILD
Last active August 18, 2019 15:06
SolArc-Theme PKGBUILD
# Maintainer: Joey Sabey <joey.sabey@gmx.com>
# Contributor: zach <zach {at} zach-adams {dot} com>
# Contributor: Gordian Edenhofer <gordian.edenhofer[at]yahoo[dot]de>
pkgname=gtk-theme-solarc-git
_pkgname=solarc-theme
_pkgauthor=schemar
_gnomeversion=3.32
pkgver=817.3e68bc0
pkgrel=1
@Omnikron13
Omnikron13 / sqlite.vim
Last active September 19, 2019 00:06 — forked from mfixman/sqlite.vim
" Vim syntax file
" Maintained at https://gist.github.com/Omnikron13/8cf68e947fe2d7f1bc73ed46661e9561
" Language: SQLite
" Maintainer: Joey Sabey <joey.sabey@gmx.com>
" Contributor: Martin Fixman <martinfixman at gmail dot com>
" Last Change: 2019-09-19
" Version: 0.4
" Updated for SQLite v3.29.0
" Description: List of keywords used by SQLite.