Skip to content

Instantly share code, notes, and snippets.

@stephan-t
stephan-t / vscode-fix.sh
Last active July 4, 2020 22:49
Fixes texture corruption in VS Code terminal after resuming from suspend
#!/bin/bash
# Fixes texture corruption in VS Code terminal after resuming from suspend.
#
# Place script in /lib/systemd/system-sleep/ so it can run after resuming.
#
# Dependencies: jq
case "$1" in
@tcurvelo
tcurvelo / takeout.js
Created April 18, 2018 00:46
WIP: Automating Google Takeout Download
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('https://takeout.google.com/');
const input = await page.evaluate(() => {
const next = document.querySelector('#identifierNext');
@fats
fats / weechat_grayout.txt
Last active September 26, 2022 17:05
[weechat] Gray out join/part/quit messages
/set irc.look.color_nicks_in_server_messages off
/set colorize_nicks.look.ignore_tags irc_join,irc_part,irc_quit
/set irc.color.message_join darkgray
/set irc.color.message_quit darkgray
/set irc.color.reason_quit darkgray
/set weechat.color.chat_tags darkgray
/set weechat.color.chat_nick darkgray
/set weechat.color.chat_host darkgray
/set weechat.color.chat_delimiters darkgray
/set weechat.color.chat_channel darkgray
#!/bin/bash
#updated ffmpeg progress indicator
#by Rupert Plumridge
#for updates visit www.prupert.co.uk
#Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales Licence
# Based on the ffmpegprogress bar from: http://handybashscripts.blogspot.com/2011/01/ffmpeg-with-progress-bar-re-work.html
# which was based on my initital progress script - circle of life and all that ;)
# version 2.0
# 07.04.2011
# now uses apparently better progress detection, based on duration of overall video and progress along the conversion
@epcim
epcim / kubernetes_pods_docker_disk_usage.md
Last active January 22, 2024 03:57
docker disk space introspection kubernetes docker overlay

identify big pods/containers

investigage big files

DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee  $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log

misbehave processes

@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@dropmeaword
dropmeaword / browser_history.md
Last active April 5, 2024 17:37
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@nrk
nrk / command.txt
Created April 2, 2012 19:19
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
@huyng
huyng / reflect.py
Created February 7, 2011 17:57
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@ClemRz
ClemRz / _readme.md
Last active April 23, 2024 08:32
This is how you download a KML from alltrails.com without needing a PRO account.