Skip to content

Instantly share code, notes, and snippets.

View YourFriendCaspian's full-sized avatar
🙃
I'm sure I'll be slow to respond so don't be mad.

yourfriendcaspian YourFriendCaspian

🙃
I'm sure I'll be slow to respond so don't be mad.
View GitHub Profile
# Cleanup commands
# To stop compose.yml
# docker-compose -f ~/docker/docker-compose.yml down
# docker system prune && docker image prune && docker volume prune
version: "3.6"
services:
#-----------------------------------------------------------
# portainer
version: '2.1'
services:
grafana:
container_name: grafana
image: proxx/grafana-armv7
user: "1000"
ports:
- 3000:3000
volumes:
- /opt/grafana:/etc/grafana:rw
@YourFriendCaspian
YourFriendCaspian / tmux.conf
Created March 22, 2019 20:04 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@YourFriendCaspian
YourFriendCaspian / convert.py
Created March 21, 2019 16:45 — forked from rednebmas/convert.py
Convert sqlite3 dump to mysql importable statements
import re, fileinput
print 'SET FOREIGN_KEY_CHECKS=0;'
def main():
for line in fileinput.input():
process = False
for nope in ('BEGIN TRANSACTION','COMMIT',
'sqlite_sequence','CREATE UNIQUE INDEX'):
if nope in line: break
@YourFriendCaspian
YourFriendCaspian / fix-infinality.md
Created March 15, 2019 05:14 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@YourFriendCaspian
YourFriendCaspian / Monokai.colorscheme
Created March 15, 2019 05:04 — forked from wdullaer/Monokai.colorscheme
Monokai Konsole Colourscheme
[Background]
Color=40,40,40
[BackgroundIntense]
Color=40,40,40
[Color0]
Color=73,72,62
[Color0Intense]
@YourFriendCaspian
YourFriendCaspian / tmux-cheatsheet.markdown
Created February 4, 2019 08:21 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@YourFriendCaspian
YourFriendCaspian / stats.py
Created February 1, 2019 01:23
Pi-Hole Ad-Blocker with PiOLED Stats Python Script
# Copyright (c) 2017 Adafruit Industries
# Author: Ladyada, Tony DiCola & James DeVito
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@YourFriendCaspian
YourFriendCaspian / replaceFilenameWhitespace.sh
Created January 31, 2019 09:29 — forked from timisenheim/replaceFilenameWhitespace.sh
Replace spaces in filenames with underscores
find -name "* *" -type d | rename 's/ /_/g' # directories
find -name "* *" -type f | rename 's/ /_/g' # files
@YourFriendCaspian
YourFriendCaspian / replaceSpaces.pl
Created January 31, 2019 09:26 — forked from mgcon/replaceSpaces.pl
replace spaces in file names with underscores
#!/usr/bin/perl
# replace spaces in all filenames with underscores
$dir = ".";
opendir(DIR, $dir) || die "Can't open $dir\n";
for (readdir(DIR)) {
next if $_ eq '.';
next if $_ eq '..';
next if $_ eq 'lost+found';