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 / sidebar_gmail
Created May 13, 2018
Toggle gmail left sidebar with escape key
View sidebar_gmail
// ==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 / gist:8fb2aacc68939d8b3dd3f7a1e2a3565b
Created Sep 18, 2017
Messure text/string in textfield
View gist:8fb2aacc68939d8b3dd3f7a1e2a3565b
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.