Skip to content

Instantly share code, notes, and snippets.

Jacob McBlane jmcblane

Block or report user

Report or block jmcblane

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View backend.nim
import auth # Contains our client definition, with login to API
import httpClient, oauth2, json
import htmlparser, xmltree, strformat
import strutils, httpcore, strtabs
type
Index* = tuple[
plain: string,
num: string ]
View .xmobarrc
Config {
-- appearance
font = "xft:UbuntuMono Nerd Font:size=10:antialias=true"
, bgColor = "#3a3a3a"
, fgColor = "#acacab"
, position = Top
--, border = BottomB
, borderColor = "#2f2f2f"
View config
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
View launch.sh
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch Polybar, using default config location ~/.config/polybar/config
polybar -r onebar &
View xmonad.hs
import System.IO
import System.Exit
import XMonad
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
View autostart
#!/usr/bin/env bash
####################
# Pre-config stuff #
####################
pkill herbstclient
hc() {
herbstclient "$@"
View autostart
#!/usr/bin/env bash
####################
# Pre-config stuff #
####################
pkill herbstclient
hc() {
herbstclient "$@"
View test.sh
#!/bin/bash
used=$(free -m | grep Mem | awk '{print $3}')
avail=$(free -m | grep Mem | awk '{print $2}')
setenta=$((avail*70/100))
ochenta=$((avail*80/100))
noventa=$((avail*90/100))
porcentaje=$(free -b | grep Mem | awk '{print $3/$2 * 100}' | awk -F . '{print $1}')
displaymbs() {
View test.sh
#!/usr/bin/sh
if [ $(cat /tmp/test) == 1 ]; then
echo "Yes!"
echo 0 > /tmp/test
else
echo "No!"
echo 1 > /tmp/test
fi
View pwned.sh
#!/usr/bin/sh
password=$(echo -n $@ | sha1sum | sed 's/ -$//')
first_five=$(echo -n $password | cut -c 1-5)
all_the_rest=$(echo -n $password | cut -c 6-)
curl -s https://api.pwnedpasswords.com/range/$first_five > /tmp/pwned
retrieve=$(cat /tmp/pwned | grep -i $all_the_rest | cut -d':' -f2)
if [ -n $retrieve ]; then
echo "Password is safe!"
You can’t perform that action at this time.