Skip to content

Instantly share code, notes, and snippets.

@georgboe
georgboe / config.toml
Created March 16, 2021 15:56
Serve video file via http and tell your Kodi instance to play the served file
Host="192.168.1.100"
Port=8080
User="your-username"
Pass="your-password"
@georgboe
georgboe / Dockerfile
Created March 25, 2020 17:05
Dockerfile for ASP.NET Core projects
# Stage 1
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
WORKDIR /build
COPY . .
RUN dotnet restore
RUN dotnet publish -c Release \
-o /app \
-r linux-musl-x64 \
--self-contained true \
-p:PublishSingleFile=true \
@georgboe
georgboe / autoexec.py
Created March 10, 2020 19:21
Script to autoplay videofiles in KODI in random order - put this your kodi userdata directory
# Autoplay videodirectory
import os, xbmc
# set path to dir you want to play
path = "/var/media/asdf"
dirList = os.listdir(path)
dirList.sort()
@georgboe
georgboe / fm2toavi.sh
Created April 12, 2017 21:31
Script to convert .fm2 files to actual video files
#!/bin/bash
# Usage: fm2toavi.sh rom.nes movie.fm2 output.mkv
if [ "$#" -ne 3 ]; then
echo "Usage: fm2toavi.sh rom.nes movie.fm2 output.mkv"
exit 1
fi
fceux \
@georgboe
georgboe / 10-nvidia-brightness.conf
Created March 7, 2016 20:16
Fixes brightness control for Thinkpad T510
#/usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

@georgboe
georgboe / copy_mysql.sh
Created July 24, 2011 13:53
Move MySQL Databases From One Server to Another
mysqldump --add-drop-table --host=ipaddress --user=root --password=your.password --all-databases > sqldump.sql
mysql --host=localhost --user=root -p < sqldump.sql
mysql_upgrade --force --password=password
@georgboe
georgboe / release_sorter.rb
Created October 29, 2010 20:48
Sorts downloaded files and folders into categories.
class ReleaseSorter
def self.sorters
@sorters ||= Array.new
end
def self.sort_statistics(release_name)
sorters.each do |sorter|
puts "#{sorter.name} - #{sorter.perform_match(release_name)}"
end
puts
@georgboe
georgboe / unpack.rb
Created October 1, 2010 18:49
Recursively traverse and unpack all .rar files
#!/usr/bin/env ruby
require 'fileutils'
module FileUtils
def self.move_to_trash(file)
dest = File.join(File.expand_path('~/.Trash/'), File.basename(file))
# Wake-On-LAN
#
# Copyright (C) 2002 by Micro Systems Marc Balmer
# Written by Marc Balmer, [email protected], http://www.msys.ch/
# This code is free software under the GPL
import struct, socket
def WakeOnLan(ethernet_address):