Skip to content

Instantly share code, notes, and snippets.

@cryzed
cryzed / fix-infinality.md
Last active April 30, 2024 22:01
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

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:

@jasonwryan
jasonwryan / tunnels
Last active August 29, 2015 14:01
Manage SSH proxy tunnels to a number of hosts
#!/usr/bin/env bash
# tunnel browser to another box
# Copyright (c) 2013 Jason W Ryan
# The MIT License (MIT) http://opensource.org/licenses/MIT
user="<your_name>"
exip="XXX.XXX.XXX.XXX"
tunnel_id="$HOME/.local/tmp/tunnel_id"
@swarminglogic
swarminglogic / watchfile.sh
Last active March 4, 2024 14:44
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@bcicen
bcicen / somacli.sh
Last active March 8, 2019 18:01
somacli
#!/bin/bash
baseurl="http://somafm.com"
tmpdir="/tmp/"
boldtext=`tput bold`
normaltext=`tput sgr0`
WGET="/usr/bin/wget"
MPLAYER="/usr/bin/mplayer"
stationnames=("Christmas Rocks!" "Christmas Lounge" "Xmas in Frisko (holiday)" "Groove Salad (ambient/electronica)" "Lush (electronica)" "Earwaves (experimental)" "Deep Space One (ambient)" "Drone Zone (ambient)" "PopTron (alternative)" "DEF CON Radio (specials)" "Dub Step Beyond (electronica)" "Space Station Soma (electronica)" "Mission Control (ambient/electronica)" "Indie Pop Rocks! (alternative)" "Folk Forward (folk/alternative)" "BAGeL Radio (alternative)" "Digitalis (electronica/alternative)" "Sonic Universe (jazz)" "Secret Agent (lounge)" "Suburbs of Goa (world)" "Boot Liquor (americana)" "Illinois Street Lounge (lounge)" "The Trip (electronica)" "cliqhop idm (electronica)" "Iceland Airwaves (alternative)" "Covers (eclectic)" "Underground 80s (alternative/electronica)" "Beat Blender (electronica)" "Doomed (ambient/industrial)" "Black Rock FM (eclectic)" "SF
@nvie
nvie / ormtools.py
Created November 29, 2013 08:59
Really useful helper that I use constantly to force myself to write more efficient Django queries.
from contextlib import contextmanager
from django.conf import settings
from django.db import connection
@contextmanager
def no_queries_allowed():
"""This is a helper method that makes it easier during development, by
throwing an exception when any queries are made within its block. Using
@tfnico
tfnico / git-developers.md
Last active December 22, 2021 13:59
When and how to contact the Git developers

Before you send an email to the Git developers' mailing list

If you are a normal Git user, and you have problems using Git, you can also try:

If you believe you've found a bug in Git for Windows or msysGit (Windows-specific), first check their issue tracker to see if the problem has already been reported. If not, send a message to msysgit@googlegroups.com or visit the online forum version.

@wilbowma
wilbowma / jail.pl
Last active August 1, 2022 11:16
A perl script to create nginx chroot in arch linux.
#a/usr/bin/perl
# This script was hastily cobbled together for my own use. It can
# probably break your system. Use at your own risk.
$JAIL = "/srv/http";
$USER = "http";
$GROUP = "http";
$WWW_DIR = "www";
sub run{
@bminer
bminer / changeTypeAttr.js
Created August 31, 2012 21:30
Cross-browser solution for changing the 'type' attribute of an `<input/>` tag.
/* x is the <input/> element
type is the type you want to change it to.
jQuery is required and assumed to be the "$" variable */
function changeType(x, type) {
if(x.prop('type') == type)
return x; //That was easy.
try {
return x.prop('type', type); //Stupid IE security will not allow this
} catch(e) {
//Try re-creating the element (yep... this sucks)
@jeremygibbs
jeremygibbs / wp2sc.py
Created January 31, 2012 10:22 — forked from Reiot/wordpress2octopress.py
WordPress XML ==> Second Crack Markdown
#!/usr/bin/env python
#######################################################
# File: wp2sc.py #
# Date: 31 January 2011 #
# Auth: Jeremy A. Gibbs #
# Depn: Requires BeautifulSoup and html2text #
# Desc: This script reads in a Wordpress .xml export #
# file and converts the contents into markdown #
# formatted files suitable to import into #
# Marco Arment's Second Crack static blogging #
@mikeyk
mikeyk / gist:1329319
Created October 31, 2011 22:56
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])