Skip to content

Instantly share code, notes, and snippets.

***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
Action:
@krizajb
krizajb / youtube-enhancer.json
Created December 29, 2020 09:20
youtube-enhancer config
{
"version":"2.0.101",
"settings":
{
"autofocusevents":"ads,annotations,cinema,size,boost,loop,speed,filters",
"autopausevideos":true,
"backgroundcolor":"#000000",
"backgroundopacity":85,
"blur":0,
"brightness":100,
@krizajb
krizajb / slo.json
Last active December 28, 2020 13:38
Slovenian QWERTZ keybindings for macOs
{
"title": "Slovenian keyboard bindings",
"rules": [
{
"description": "Alt + D, Alt + F - Square brackets",
"manipulators":
[
{
"type": "basic",
"from": {
@krizajb
krizajb / remap-win-key.ahk
Last active April 5, 2020 06:59
Authotkey script for remapping windows (super) key to Shift+Alt+Space and windows key + h to minimize the current window, windows + move.
; Remap windows key + h to minimize the current window
#h::
WinMinimize A
return
; Disable the keyboard layout switcher
Ctrl & Shift::
return
; Remap windows key to the launcher
@krizajb
krizajb / cpc_bug.java
Last active March 17, 2020 08:17
CPC business process bug
// note: all steps check if the logged in user is the CPC_AUTHORITY (Role)
// was the chief selected (via dialog)
if (null != this.selectedChief) {
// store selected chief id to the application
this.application.setChiefId(this.selectedChief.getId());
// remove chiefs if from the visited id list (so the chief sees the application as "new" in the list)
this.application.removeVisitedId(this.selectedChief.getId());
// is registrar only changing the chief selection
function filterList(componentName, label, filter) {
let component = PF(componentName),
itemLabel = label.toLocaleLowerCase(),
item = $(component.items)
.filter(function () {
return $(this).data('label').toString().toLocaleLowerCase() === itemLabel;
})
.first();
if (item === undefined) {
@krizajb
krizajb / gmail-sidebar-toggle
Last active August 8, 2019 14:08
Toggle gmail left sidebar with escape key
// ==UserScript==
// @name Toggle left sidebar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Toggles left gmail sidebar on "esc" keypress.
// @author blaz.krizaj@gmail.com
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @match *://mail.google.com/*
// @grant none
// ==/UserScript==
@krizajb
krizajb / toggle_touchpad.py
Created July 27, 2019 14:11
Toggles touchpad
#!/usr/bin/python2
# -*- 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
krizajb / fan-control.bat
Created July 20, 2019 20:45
Restarts HWiNFO instance end re-disables dGPU
@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
krizajb / measureString.as
Last active July 19, 2019 13:35
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;
}