Skip to content

Instantly share code, notes, and snippets.

@beta
beta / betaType.ini
Last active October 29, 2020 12:59
betaType: My custom MacType configurations.
; betaType
; https://gist.github.com/beta/8552d043e70cc214e34c68c25151f59c
[General]
Name=betaType
DirectWrite=1
HookChildProcesses=1
HintingMode=1
AntiAliasMode=1
AutoHotkey 2 mins █████████████████████ 100.0%
Dart 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.0%
@beta
beta / github.css
Last active August 4, 2020 03:37
Move GitHub repo header to page center, for better experience on wide screens
@media (min-width: 1280px) {
main#js-repo-pjax-container > div > div:first-child {
max-width: 1280px;
margin-left: auto;
margin-right: auto;
}
main#js-repo-pjax-container > div > nav > ul {
margin-left: calc((100vw - 1280px) / 2 - 8.5px);
}
@beta
beta / private.xml
Last active February 25, 2020 02:55
My Karabiner private configurations for ikbc Poker II.
<?xml version="1.0"?>
<root>
<item>
<name>Directions</name>
<identifier>private.directions</identifier>
<autogen>
__KeyToKey__
KeyCode::I, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L,
KeyCode::CURSOR_UP
</autogen>
@beta
beta / midnight-twitter.css
Last active September 10, 2019 16:07
Midnight Twitter - A Stylish style that adds some light to the default "lights out" theme of Twitter.
/* Background, tweet background & panels on the right. */
body, .r-kemksi, .r-1igl3o0, .r-9qu9m4 {
background-color: rgb(33, 36, 38) !important;
}
/* Tweet background (hovered). */
.r-1ysxnx4 {
background-color: rgb(48, 53, 58) !important;
}
@beta
beta / beta.json
Last active February 2, 2018 05:38
beta's Karabiner Keyboard Bindings
{
"title": "beta's Keyboard Bindings",
"rules": [
{
"description": "Control + I/J/K/L = Arrows",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "i",
func WriteFile(...) (err error) {
...
defer func() {
if cerr := f.Close(); cerr != nil && err == nil {
err = cerr
}
}()
_, err = f.Write(data)
return err
temp = set()
output = [e for e in input if e not in temp and not temp.add(e)]
@beta
beta / generator.py
Created December 7, 2017 12:21
List comprehension for generator in Python.
squared_gen = (x**2 for x in range(5))
type(squared_gen) # generator
@beta
beta / hotkeys.ahk
Last active August 11, 2017 07:17
AutoHotkey script for some hotkeys for Windows.
; Disable Caps Lock
*CapsLock::Return
; Caps + J = Left
; Shift + Caps + J = Shift + Left
CapsLock & j::
If GetKeyState("LShift", "p")
Send, +{Left}
Else
Send, {Left}