Skip to content

Instantly share code, notes, and snippets.

Flying airplanes

Maciej Swic maciekish

Flying airplanes
View GitHub Profile
maciekish / RedirectWellKnownFolders.ps1
Created Dec 30, 2020
Redirect Well Known Folders
View RedirectWellKnownFolders.ps1
$username=( ( Get-WMIObject -class Win32_ComputerSystem | Select-Object -ExpandProperty username ) -split '\\' )[1]
$newPath = "D:\$($username)"
$key1 = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
$key2 = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
set-ItemProperty -path $key1 -name Desktop "$($newPath)\Desktop"
set-ItemProperty -path $key2 -name Desktop "$($newPath)\Desktop"
set-ItemProperty -path $key1 -name Pictures "$($newPath)\Pictures"
set-ItemProperty -path $key2 -name Pictures "$($newPath)\Pictures"
set-ItemProperty -path $key1 -name "My Pictures" "$($newPath)\Pictures"
set-ItemProperty -path $key2 -name "My Pictures" "$($newPath)\Pictures"
maciekish /
Last active Sep 25, 2020
Backup Pi SD Card to Samba
#Usage bash <(curl -Ls
if [ `whoami` != 'root' ]
echo "You must be root to do this."
if [ -z "$1" ]
maciekish / script-ending
Last active May 28, 2020
T-Rex 3.0 Settings for Simplify3D
View script-ending
M104 S0
M140 S0
G92 E1
G1 E-1 F300
G28 X0 Y0
G1 X0 Y350 F9000;
G91 ;relative positioning
G1 Z50; move up
G90 ;absolute positioning
M106 P0 S0
maciekish /
Last active May 1, 2018
Qnap Plex Updater
# crontab -e as admin on Qnap.
pkg=$(find /share/Media/plexmediaserver* | head -n 1)
docker=$(which docker)
if [ -f "$pkg" ]
maciekish / bigpicture.ahk
Last active Jun 8, 2022
AutoHotkey Scripts
View bigpicture.ahk
#SingleInstance, Force
; This script switches audio devices and launches Big Picture Mode
;-----------------------------HOW TO------------------------------
;- 1) Download NirCmd and run as admin to install to Win dir. -
;- -
;- 2) Change Device names below to match your playback devices. -
;- 3) Change Steam path below to match where Steam is installed. -
maciekish / Anet+A6_settings.inst.cfg
Last active Mar 2, 2021
Anet A6 profile for Cura 3.5. Start Cura once, create a custom printer called "Anet A6" without changing any of the settings and close Cura. Save and overwrite both files in "AppData\Roaming\cura\3.1\definition_changes" and start Cura again.
View Anet+A6_settings.inst.cfg
version = 4
name = Anet A6_settings
definition = custom
setting_version = 5
type = definition_changes
maciekish /
Created Aug 10, 2016
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/*
open /Applications/
View InstallSendPdfToEvernote
tell application "Finder"
set appPath to (path to application "Evernote" as text)
on error
display dialog "Couldn't find Evernote. Is it installed?"
end try
set libPath to (path to library folder from user domain as text)
set newFolder to make new folder at libPath with properties {name:"PDF Services"}
maciekish / alternative
Last active Aug 29, 2015
Aerowinx PSX Layout
View alternative
[Aerowinx Precision Simulator - Layouts]
[Version 10.0.0]
[Layout 1]
maciekish / UINavigationBar+CustomHeight.h
Created Sep 10, 2014
Custom UINavigationBar height working in iOS 7 and 8. To use, find your navigation bar reference and just setHeight:200 etc.
View UINavigationBar+CustomHeight.h
// UINavigationBar+CustomHeight.h
// Copyright (c) 2014 Maciej Swic
// 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