This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This Source Code Form is subject to the terms of the bCDDL, v. 1.1. | |
-- If a copy of the bCDDL was not distributed with this | |
-- file, You can obtain one at http://beamng.com/bCDDL-1.1.txt | |
--define missing functions | |
pluginPath = debug.getinfo(1).source:gsub("\\","/") | |
pluginPath = pluginPath:sub(1, (pluginPath:find("trafficSignals.lua"))-2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
; Open files [HKEY_CLASSES_ROOT\*\shell\Open with VS Code] @="Edit with VS Code" | |
"Icon"="%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe" | |
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] | |
@="\"%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\"" | |
; This will make it appear when you right click ON a folder | |
; The "Icon" line can be removed if you don't want the icon to appear |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This modifies the behavior after slide, helps to continue sprinting after sliding. | |
; You can still press crouch manually while sliding to keep crouched after slide. | |
; You need to edit the key of slide (mine is LAlt) and maybe Space to jump ?. | |
; This is AutoHotkey v2 syntax | |
; All the close stuff is made to let Steam detect when the "game" has exit, which is the autohotkey process handle now. | |
~LAlt::{ | |
If (GetKeyState("LAlt", "P") && GetKeyState("CapsLock", "P") && WinActive("ahk_exe WW3-Win64-Shipping.exe")){ | |
Sleep 200 | |
Send "{Space down}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Speed Sensitivity=80% | |
Steering Speed=100 | |
Gamma=2.4 | |
Filter=0.82 | |
Deadzone=0.23 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gives you accounting for unique visitors | |
cat $1 | cut -d" " -f1 | sort | uniq | wc -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hbox.titlebar-buttonbox { | |
appearance: none !important; | |
} | |
toolbarbutton.titlebar-button { | |
border-radius: 0px !important; | |
min-height: 45px !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xdotool getwindowfocus getwindowname | \ | |
grep "Plasma" && \ | |
qdbus org.kde.ksmserver /KSMServer logout 1 0 1 || \ | |
xdotool getwindowfocus windowclose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
def terminate_thread(thread): | |
"""Terminates a python thread from another thread. | |
:param thread: a threading.Thread instance | |
""" | |
if not thread.is_alive(): | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
from PIL import Image | |
import numpy as np | |
def countDiff(img1, img2): | |
s = 0 | |
if img1.size != img2.size or img1.getbands() != img2.getbands(): | |
return -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Template SystemD service for a auto healing (reverse) SSH tunnel. | |
#Place this to /etc/systemd/system/ folder. | |
#Edit all values inside <> | |
#/etc/systemd/system/ssh-persistent-tunnel.service | |
#Edit the ports, remote user+host, and the key file. | |
#In the authorized_keys file on the other system, use something like this: | |
#<restrict,command="echo 'No Commands Allowed.'",port-forwarding,permitopen="localhost:22",permitlisten="localhost:5000"> | |
[Unit] | |
Description=SSH Persistent Tunnel |
NewerOlder