Skip to content

Instantly share code, notes, and snippets.

Blaž krizajb

Block or report user

Report or block krizajb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
krizajb / remap-win-key.ahk
Last active Aug 31, 2019
Authotkey script for remapping windows (super) key to Shift+Alt+Space and windows key + h to minimize the current window, windows + move.
View remap-win-key.ahk
; This script modified from the original:
; by The How-To Geek
LWin & LButton::
CoordMode, Mouse ; Switch to screen/absolute coordinates.
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin%
if EWD_WinState = 0 ; Only if the window isn't maximized
# -*- coding: utf-8 -*-
'''Program to toggle Touchpad Enable to Disable or vice-versa.'''
import commands
import re
def current_id():
""" Search through the output of xinput and find the line that has the
krizajb / fan-control.bat
Created Jul 20, 2019
Restarts HWiNFO instance end re-disables dGPU
View fan-control.bat
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
start /min cmd /c taskkill /f /im HWiNFO64.exe
start /min /wait cmd /c D:\Documents\Qord\dell-xps\devcon.exe enable "PCI\VEN_10DE&DEV_1C8C&SUBSYS_087C1028&REV_A1"
start /min /wait cmd /c D:\Documents\Qord\dell-xps\devcon.exe disable "PCI\VEN_10DE&DEV_1C8C&SUBSYS_087C1028&REV_A1"
start /min cmd /c "C:\Program Files\HWiNFO64\HWiNFO64.exe"
krizajb / gmail-sidebar-toggle
Last active Aug 8, 2019
Toggle gmail left sidebar with escape key
View gmail-sidebar-toggle
// ==UserScript==
// @name Toggle left sidebar
// @namespace
// @version 0.1
// @description Toggles left gmail sidebar on "esc" keypress.
// @author
// @require
// @match *://*
// @grant none
// ==/UserScript==
krizajb /
Last active May 3, 2018 — forked from walkerjeffd/
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
krizajb /
Last active Mar 6, 2018
Adds option to Justify text aligenment in processing.
import processing.core.*;
public class PGraphicsJava2DJustify extends PGraphicsJava2D {
public static int JUSTIFY = 4;
static protected void showTextFontException(String method) {
throw new RuntimeException("Use textFont() before " + method + "()");
krizajb /
Last active Jul 19, 2019
Messure text/string in textfield
public static function measureString(str:String, format:TextFormat) : Number {
var textField:TextField = new TextField();
textField.autoSize = TextFieldAutoSize.LEFT; // adjust appropriately
textField.defaultTextFormat = format;
textField.text = str;
return textField.textWidth;
You can’t perform that action at this time.