Skip to content

Instantly share code, notes, and snippets.

@ngollan
ngollan / convert-ed-screenshots.ps1
Created June 21, 2020 17:00
Convert Elite Dangerous screenshots to PNG and set creation date as XMP metadata.
Get-ChildItem "$([Environment]::GetFolderPath("MyPictures"))\Frontier Developments\Elite Dangerous" -Filter "*.bmp" |
Foreach-Object {
$dir = $_.DirectoryName
$base = $_.BaseName
$originalDate = $_.CreationTimeUtc
$destination = "$($dir)/PNG/$($base).png"
$result = "" | select name, converted, setMetadata
$result.name = $base
$result.converted = $false
@ngollan
ngollan / rename-ffxiv-screenshots.ps1
Last active May 25, 2020 18:10
Rename FFXIV screenshots with ISO 8601 dates
Get-ChildItem "$([Environment]::GetFolderPath("MyDocuments"))\My Games\FINAL FANTASY XIV - A Realm Reborn\screenshots" -Filter "ffxiv_*.png" |
Foreach-Object {
$_.BaseName -match "ffxiv_(?<day>\d\d)(?<month>\d\d)(?<year>\d\d\d\d)_(?<hour>\d\d)(?<minute>\d\d)(?<second>\d\d)(?<suffix>_[^\.]*)?"
$m = $Matches
Rename-Item -Path $_.FullName -NewName "$($m.year)-$($m.month)-$($m.day) $($m.hour)_$($m.minute)_$($m.second) screenshot$($m.suffix).png"
}
@ngollan
ngollan / remux.ps1
Last active November 25, 2017 13:30
Remux videos in bulk with FFMPEG
Get-ChildItem "." -Filter "*.mp4" |
Foreach-Object {
$destination = "MOV\$($_.BaseName).mov"
if (-not (Test-Path $destination)) {
Write-Output "Remux $($_) -> $($destination)"
d:\bin\ffmpeg -nostats -hide_banner -loglevel error -i "$_" -vcodec copy -acodec copy $destination
}
}
/usr/bin/setxkbmap -option 'ctrl:nocaps' -option kpdl:dot
jQuery.getScript(
"https://use.typekit.net/my-kit-id.js",
function() {
try{
Typekit.load();
} catch(e) {}
}
);
lsb (9.20150826) unstable; urgency=low
This update drops all lsb-* compatibility packages, and is therefore an
abandon of the pursuit of LSB compatibility for Debian. Only lsb-release and
lsb-base are kept as they continue to be used throughout the archive.
-- Didier Raboud <odyx@debian.org> Wed, 26 Aug 2015 12:00:00 +0200
@ngollan
ngollan / 00-overrides.conf
Last active November 16, 2017 13:22
fontconfig overrides
<?xml version='1.0'?>
<!-- DTD path for debianoid systems -->
<!DOCTYPE fontconfig SYSTEM '/usr/share/xml/fontconfig/fonts.dtd'>
<fontconfig>
<!-- fuck helvetica, courtesy of http://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/ -->
<alias>
<family>Helvetica</family>
<prefer><family>TeX Gyre Heros</family></prefer>
<default><family>sans</family></default>
submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_sasl_authenticated_header=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
dovecot-spamass unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -u ${user}@${nexthop} -e /usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${recipient}
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: mumble-server-static
# Required-Start: $network $local_fs $remote_fs dbus
# Required-Stop: $network $local_fs $remote_fs dbus
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Mumble VoIP Server (static)
# Description: init script for the Mumble VoIP Server murmurd (static).
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Mumble\Mumble\overlay]
"enable"="false"