Skip to content

Instantly share code, notes, and snippets.

View 1094's full-sized avatar

1094 1094

  • Neverwhere
View GitHub Profile
@TimothyLoyer
TimothyLoyer / sn-convert-img
Last active May 8, 2023 16:36
Bash script to convert images for use with Supernote A6X and A5X
#!/usr/bin/bash
################################################################################
#
# Description:
# Convert images for compatibility with the Supernote A6X and A5X.
#
# If an original image's size exceeds the ratio required to be compatible
# with the Supernote, it will automatically be centered and cropped.
#
# Usage:
@boreycutts
boreycutts / i3-gaps_installation_guide.md
Last active January 30, 2024 19:05
A simple installation guide for i3-gaps

Installing i3-gaps

Dependencies

i3-gaps has some packages that are required for it to work so install these things:

sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake

You also need to install libxcb-xrm-dev, but I got Unable to locate package libxcb-xrm-dev when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:

mkdir tmp
" Mike's statusline
let g:battery_level = ''
function! SetBatteryLevel(timer_id)
let l:battery_level = system('acpi | grep -oP "(\d+)%" | tr -d "\n"')
if (battery_level != '')
let g:battery_level = l:battery_level
redraw!
endif
call timer_start(30000, 'SetBatteryLevel')
endfunction
@noromanba
noromanba / t-um-block.user.js
Last active September 29, 2021 11:24
remove t.umblr.com redirector from links on Tumblr for UserScript/Content Scripts
// ==UserScript==
// @name t.um block
// @namespace http://noromanba.flavors.me
// @description remove t.umblr.com redirector from links on Tumblr for UserScript/Content Scripts
// @include http://*.tld/*
// @include https://*.tumblr.com/*
// @grant none
// @noframes
// @run-at document-body
// @version 2018.2.12.0
@etandel
etandel / centralize.zsh
Last active January 8, 2020 02:56
Random background for i3lock
#!/bin/zsh
newname=$(echo $1 | awk -F'.' '{print $1}').png # i3lock only accepts pngs
resolution=$(xrandr | fgrep '*' | awk '{print $1}')
# if the image is too large, run the folloowing line first and then run the script again on temp.jpg:
# convert $1 -gravity Center -adaptive-resize $resolution -background black temp.jpg
convert $1 -background black -gravity center -extent $resolution -background black $newname