Skip to content

Instantly share code, notes, and snippets.

Robin Skahjem-Eriksen ironhouzi

  • Norway
Block or report user

Report or block ironhouzi

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
@cryzed
cryzed / fix-infinality.md
Last active Oct 20, 2019
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.
View fix-infinality.md

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@so0k
so0k / kubectl.md
Last active Oct 20, 2019
Playing with kubectl output
View kubectl.md

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@kshenoy
kshenoy / CapsUnlocked.ahk
Created Jun 12, 2015
Use CapsLock as Control/Escape in Windows
View CapsUnlocked.ahk
; 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::
@senko
senko / maybe.py
Last active Jun 16, 2019
A Pythonic implementation of the Maybe monad
View maybe.py
# maybe.py - a Pythonic implementation of the Maybe monad
# Copyright (C) 2014. Senko Rasic <senko.rasic@goodcode.io>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@matheusoliveira
matheusoliveira / json_manipulator.sql
Last active Aug 13, 2019
Simple PostgreSQL functions to manipulate json objects. (Note: performance is not a concern for those functions)
View json_manipulator.sql
CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json)
RETURNS json
IMMUTABLE
LANGUAGE sql
AS $$
SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json
FROM (
SELECT * FROM json_each(data)
UNION ALL
SELECT * FROM json_each(insert_data)
View ultisnips_py_console
global !p
import string, vim
import textwrap
_snips_fns = {}
def py(*args):
import re
old_a = vim.eval('@a')
@XVilka
XVilka / TrueColour.md
Last active Oct 20, 2019
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
View beautiful_idiomatic_python.md

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!

@eberle1080
eberle1080 / kwallet.py
Created Oct 21, 2011
Python KWallet sample usage (command line)
View kwallet.py
# I just wanted to find a simple way to store credentials in KWallet, and fetch it from
# a command line application. Here's how (assumes the credentials are already set):
def getCredentials():
from PyKDE4.kdeui import KWallet
from PyQt4 import QtGui
from PyQt4 import QtCore
app = QtGui.QApplication([])
wallet = KWallet.Wallet.openWallet(KWallet.Wallet.LocalWallet(), 0)
You can’t perform that action at this time.