Skip to content

Instantly share code, notes, and snippets.

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 6, 2021
Hyperlinks in Terminal Emulators
View Hyperlinks_in_Terminal_Emulators.md
@cryzed
cryzed / fix-infinality.md
Last active May 4, 2021
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:

@fasterthanlime
fasterthanlime / state-of-emergency-in-france.md
Last active Mar 26, 2021
What the state of emergency means in France, where it's been declared following the Paris attacks
View state-of-emergency-in-france.md
@Dhertz
Dhertz / Ubuntu_Aerial.md
Last active Aug 8, 2020
Quick overview of how to get Apple's new TV screensavers working on most linux systems.
View Ubuntu_Aerial.md

Using Apple’s Aerial Screensavers on Ubuntu After coming across the [Aerial] (https://github.com/JohnCoates/Aerial) screensavers for Mac, and installing them, I decided that I had had enough of the graphics-demos of my Ubuntu Precise system. I hope to provide a simple guide on how to add them to your setup as well.

First, you need to install xscreensaver (for example with aptitude, but your distro should have it):

sudo aptitude install xscreensaver
View pragmatic-touch-icons.md

NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.

I'd like to hear how you approach this: @valuedstandards or comment on this gist.

The issue

You have to include a boatload of link elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':

![Touch Icon Links](https://o.twimg.com/2/proxy.jpg?t=HBj6AWh0dHBzOi8vcGhvdG9zLTYuZHJvcGJveC5jb20vdC8yL0FBRGFGY1VRN1dfSExnT3cwR1VhUmtaUWRFcWhxSDVGRjNMdXFfbHRJWG1GNFEvMTIvMjI3OTE2L3BuZy8xMDI0eDc2OC8yL18vMC80L1NjcmVlbnNob3QlMjAyMDE1LTA0LTE0JTIwMTYuNTYuMjYucG5nL0NNejBEU0FCSUFJZ0F5Z0JLQUkvNGR1eDZnMzZmYnlzYWI3

@passcod
passcod / dc.rb
Last active Aug 29, 2015
Implementation of GNU's dc (reverse-polish arbitrary-precision stack-based command-line calculator) in Ruby
View dc.rb
#!/usr/bin/env ruby
require 'bigdecimal'
class Dc
def initialize
@stack = []
@registers = []
# TODO: support these
@passcod
passcod / .gitignore
Last active Nov 20, 2020
License stats for crates on crates.io
View .gitignore
/metacrate-*
@passcod
passcod / yaml.tmpl
Created Aug 24, 2014
Template file to dump docker-gen's output in YAML format
View yaml.tmpl
---
{{ range $_, $cont := $ }}
{{ $addrLen := len $cont.Addresses }}
{{ $envLen := len $cont.Env }}
{{ $regLen := len $cont.Image.Registry }}
- id: "{{ $cont.ID }}"
{{ if eq $addrLen 0 }}
addresses: ~
{{ else }}
addresses:
anonymous
anonymous / rss_proxy.cgi.sh
Created Aug 10, 2014
rss_proxy.cgi
View rss_proxy.cgi.sh
#!/bin/bash
PATH="/mnt/data/www/temp_rss/"
DATE=/bin/date
STAT=/usr/bin/stat
SED=/bin/sed
TOUCH=/usr/bin/touch
EXECPATH="/mnt/data/www/rss_proxy"
TERM=""
if [ -z "$QUERY_STRING" ] || [[ $QUERY_STRING == url* ]]
then
anonymous
anonymous / rss_proxy.d.d
Created Aug 10, 2014
rss_proxy.d
View rss_proxy.d.d
module rss_proxy;
import tools.base, std.file, tools.downloader;
string download(string url) {
char* tmpfilp = tmpnam(null);
if (!tmpfilp) throw new Exception("could not get temp file name");
auto tmpfil = toString(tmpfilp);
scope(exit) unlink(toStringz(tmpfil));
if (system(toStringz("/usr/bin/wget --timeout=60 -q -O \""~tmpfil~"\" \""~url~"\"")) == -1) {