Skip to content

Instantly share code, notes, and snippets.

View rzyns's full-sized avatar

Janusz Dziurzyński rzyns

View GitHub Profile
@rzyns
rzyns / CapsUnlocked.ahk
Created June 6, 2020 11:40 — forked from kshenoy/CapsUnlocked.ahk
Use CapsLock as Control/Escape in Windows
; This is a complete solution to map the CapsLock key to Control and Escape without losing the ability to toggle CapsLock
; We use two tools here - any remapping software to map CapsLock to LControl and AutoHotkey to execute the following script
; This has been tested with MapKeyboard (by Inchwest)
; This will allow you to
; * Use CapsLock as Escape if it's the only key that is pressed and released within 300ms (this can be changed below)
; * Use CapsLock as LControl when used in conjunction with some other key or if it's held longer than 300ms
; * Toggle CapsLock by pressing LControl/CapsLock + RControl
~*LControl::
@rzyns
rzyns / quit.go
Last active August 13, 2019 12:36
Nice way to quit in Go
package main
import (
"fmt"
"os"
)
type quitNormal string
func quit(msg string) quitNormal {
@rzyns
rzyns / randomcrap.go
Created August 12, 2019 09:52
neovim go client stuff
package main
import (
"fmt"
"os"
"time"
"github.com/eiannone/keyboard"
"github.com/gdamore/tcell"
"github.com/neovim/go-client/nvim"
mdfind 'kMDItemFSCreationDate < $time.iso(2008-03-15T23:59:59)
@rzyns
rzyns / constant.php
Created October 16, 2017 14:26
Playing around with different strategies for making constants easier to work with
<?php
class constant {
function __get($name) {
return defined($name) ? constant($name) : new EmptyValue($name);
}
function __set($name, $value) {
return !defined($name) and define($name, $value);
}
}

Keybase proof

I hereby claim:

  • I am rzyns on github.
  • I am rzyns (https://keybase.io/rzyns) on keybase.
  • I have a public key ASByscSary_ES0cOH4X7OESDSpRRQ9u1J4FdPfOIT32tswo

To claim this, I am signing this object:

@rzyns
rzyns / # php70 - 2016-03-13_21-17-00.txt
Created March 14, 2016 01:17
php70 (homebrew/php/php70) on OS X 10.11.3 - Homebrew build logs
Homebrew build logs for homebrew/php/php70 on OS X 10.11.3
Build date: 2016-03-13 21:17:00
@rzyns
rzyns / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@rzyns
rzyns / formike.php
Created September 5, 2014 17:25
DOMDocument
<?php
$response = new DOMDocument();
$response->loadXML(<<<XML
<?xml version="1.0" encoding="UTF-8"?>
<WebStoreDetailInformationResponse>
<WebStore storeID="11">
<ItemData>
<Item itemCode="TEST10008" active="True" incomplete="False" isBundle="False" isTaxable="True" isAutoShip="True">
<ProductName>Couple\'s Birthstone Ring</ProductName>
@rzyns
rzyns / highlight.js
Created June 5, 2013 18:00
highlight links
$('a[href*=evesaddiction]').wrap('<div style="display: inline-block; background-color: red; border: 5px solid red;"></div>');