Skip to content

Instantly share code, notes, and snippets.


Kristopher Ives krisives

  • United States
View GitHub Profile
View 81-surfacepro3_wifi.rules
SUBSYSTEM=="net", KERNEL=="wlp1s0", RUN+="/sbin/iw dev $name set power_save off"
krisives / shred-all
Created Feb 26, 2019
Shred files in Linux including directory names
View shred-all
#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
echo "Usage: shred-all <dir>"
exit 1
if [ ! -d "$dir" ]; then
krisives / ffjoin
Created Jan 1, 2019
Helper script for joining (concatenating) multiple media files together using ffmpeg without using an intermediate text file
View ffjoin
#!/usr/bin/env bash
if [ $# -lt 2 ]; then
echo "Usage: ffjoin <joined> <file>..."
exit 1
krisives /
Created Nov 17, 2018
Fix season/episode named files to be simple

Download the fix-season-names file and place it into /usr/local/bin then anytime you download a file and wish to rename it to a simpler name, run fix-season-names <name of file> on the command line and it will rename the files to a simple name like "S02E03.mkv" or similar.

If you have a lot of files, you can run it like this:

fix-season-names *.mkv *.mp4

If you have files in nested directories you can run it like this:

View pinta-crash.log
free(): invalid pointer
at <unknown> <0xffffffff>
at (wrapper managed-to-native) GLib.SList.g_free (intptr) <0x0005f>
at GLib.ListBase.Empty () <0x0013c>
at GLib.ListBase.Dispose (bool) <0x0000f>
at GLib.ListBase.Finalize () <0x0001d>
at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) <0x00068>
krisives /
Created Sep 18, 2018
A script that saves the KDE Picture of the Day (POTD) you can set on a cronjob to keep a history of all domains.
today=$(date +%Y-%m-%d)
dir=$(realpath ~/Pictures/Daily)
mkdir -p "$dir"
for path in ~/.cache/plasmashell/plasma_engine_potd/*; do
name=$(basename "$path")
krisives /
Created Aug 23, 2018
Download the userChrome.css and run the commands in to get a hidden tab bar when only one tab is open in Firefox
cd ~/.mozilla/firefox/*.default/
mkdir chrome
cp ~/Downloads/userChrome.css .
View Derbycon2017_Hyatt_Card_Puzzle.csv
Y I 1C 53 62 7E 56
C C 4B 4C 59 49 46
O E 2 4E 23 7F 5D
M D 0D 48 45 4A 4E
E A C B E 18 4A 6A 56 34
K T H S R 37 46 34 42 22
E O P P B 7B 2E 4E 55 75
Y C R O Y 75 43 29 41 70
C T O N C 6C 70 54 4C 54
A F U S O 59 37
package citydoku;
public class BoardFitness {
public double evaluate(Board board) {
double error = 0;
for (int i = 0; i < 9; i++) {
error += evaluateCell(board, i);
error += evaluateRow(board, i);
error += evaluateColumn(board, i);

IP4 Header

Offset Length Notes
0 1 Version & Header Length
1 1 Type of Service (ToS)
2 2 Total Length
4 2 Packet ID
6 2 Fragment Offset
8 1 TTL