Skip to content

Instantly share code, notes, and snippets.

@sirkkalap
sirkkalap / mouse-wasd.ahk
Created December 10, 2023 21:01
AutoHotkey script to type WASD keys using relative mouse movements when RShift is pressed.
#Persistent
SetTimer, CheckMouse, 10
return
; Initialize state variables
WDown := false
ADown := false
SDown := false
DDown := false
Get-Item -Path HKCU:\Software\Microsoft\GameBar -Verbose|ft -a
If (Test-Path HKCU:\Software\Microsoft\GameBar) {Get-Item HKCU:\Software\Microsoft\GameBar|Set-ItemProperty -Name AllowAutoGameMode -Value 1 -Verbose -Force} #Enable Game Mode
If (Test-Path HKCU:\Software\Microsoft\GameBar) {Get-Item -Path HKCU:\Software\Microsoft\GameBar|Set-ItemProperty -Name AllowAutoGameMode -Value 0 -Verbose -Force}

title

Here is some markdown

sudo bash -c 'for p in /Applications/Adobe* /Applications/Utilities/Adobe* /Library/Application\ Support/Adobe /Library/Preferences/com.adobe.* /Library/PrivilegedHelperTools/com.adobe.* /private/var/db/receipts/com.adobe.* ~/Library/Application\ Support/Adobe* ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.adobe* ~/Library/Application\ Support/CrashReporter/Adobe* ~/Library/Caches/Adobe ~/Library/Caches/com.Adobe.* ~/Library/Caches/com.adobe.* ~/Library/Cookies/com.adobe.* ~/Library/Logs/Adobe* ~/Library/PhotoshopCrashes ~/Library/Preferences/Adobe* ~/Library/Preferences/com.adobe.* ~/Library/Preferences/Macromedia* ~/Library/Saved\ Application\ State/com.adobe.*; do rm -rf $p; done'
@sirkkalap
sirkkalap / blender-markers-to-csv.py
Created November 30, 2020 11:31
Write Blender sequencer markers to a CSV file
# From: https://www.quollism.com/b/archives/113
#
# "You can copypaste this script straight into Blender’s text editor and hit
# “Run Script” to output filename_frames.csv in the directory right next to
# your currently open file. Yay!"
#
import bpy
import csv
import os
@sirkkalap
sirkkalap / curl_list_of_urls.sh
Created June 3, 2019 12:44
Curl a list of urls in a loop
while read u; do
echo $u
curl -I $u
done << EOM
https://www.iki.fi/
http://www.iki.fi/iki/iki-logo-16.gif
EOM
@sirkkalap
sirkkalap / EditCachetIncidentMsg.java
Created July 10, 2017 12:33
A snippet to demonstrate editing Cachet Incident message text.
...
package fi.XXX.digitraffic.status.dto.cachet;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IncidentEditMsgDto {
public final Integer incident;
## you may need sudo permission to execute some commands or swith to root
# if installed old version by yum, remove it first
yum -y remove tmux libevent libevent-devel libevent-headers
# install deps
yum -y install gcc kernel-devel make ncurses-devel wget
# create temp dir
mkdir /tmp/for-latest-tmux
@sirkkalap
sirkkalap / .inputrc
Created May 11, 2017 17:24
.inputrc with history search
### .inputrc
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forward
#!/bin/sh -e
# Running this script will disable the on-access (real-time) scanner in F-Secure Anti-Virus for Mac
# while preserving the ability to use the on-demand (manual) scanner.
#
# Note that this *will* make the UI persistently tell you that there is a problem with real-time
# scanning. Which is true, because you disabled it. :-)
#
# NOTE THAT THIS WILL MAKE YOUR COMPUTER UNPROTECTED. DO THIS AT YOUR OWN RISK!
# NOTE THAT THIS WILL MAKE A BACKUP COPY IN YOUR "Documents" FOLDER. KEEP IT.
# NOTE THAT THIS IS AN UNSUPPORTED HACK. IT MAY STOP WORKING AT ANY TIME.