Skip to content

Instantly share code, notes, and snippets.

@cryzed
cryzed / fix-infinality.md
Last active March 20, 2025 13:16
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:

@alekseykulikov
alekseykulikov / index.md
Last active February 6, 2025 21:20
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@Avaq
Avaq / combinators.js
Last active April 29, 2025 17:32
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@jpino
jpino / CubeCompanionBackup.md
Last active November 1, 2015 16:53
How to back up the Cube Companion solves database

How to back up your Cube Companion solve times on Ubuntu

The Cube Companion Android app lacks an export feature. Happily there's a quick way to extract the solves database so you can make fancy graphs or store your times somewhere else. This mini tutorial works on Ubuntu but it should work without many modifications on other Linux distros.

Activate USB debugging on Android device

  • Go to Settings -> Developer options -> Turn ON Developer options -> Activate USB debugging

  • Connect phone to PC through USB

@chrisdotcode
chrisdotcode / Promise.hs
Created February 16, 2015 00:07
Abstract Promises in Haskell
module Promise where
import Control.Applicative (Applicative(..))
import Data.Monoid (Monoid(..))
newtype Error = Error { unString :: String } deriving (Eq, Ord, Read, Show)
data Promise a = Failed Error | Deferred | Fulfilled a
deriving (Eq, Ord, Read, Show)
@zer4tul
zer4tul / weechat.md
Last active August 21, 2021 21:12
A Simple, Base16 Friendly, Weechat Setup

A Simple, Base16 Friendly, Weechat Setup

Scripts

  • Some must-have scripts
  /script install buffers.pl buffer_autoclose.py iset.pl go.py colorize_nicks.py
@mikaelbr
mikaelbr / destructuring.js
Last active February 20, 2025 13:00
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@mattfield
mattfield / real-world-functional-javascript.md
Last active December 23, 2015 20:29
"Real-world" Functional Javascript

As software becomes more and more complex, it is more and more important to structure it well. Well-structured software is easy to write, easy to debug, and provides a collection of modules that can be re-used to reduce future programming costs. Functional programming is a paradigm shift away from how we normally think about constructing our programs and writing our abstractions. In this talk, I'd like to introduce the style of functional programming, discuss what it has to offer versus other programming metholodies (and how functional programming can complement paradigms such as OOP) and provide "real-world" examples of functional techniques such as:

  • Programming with functions as the primary construct
  • Moving from thinking imperatively to thinking declaritively in terms of the way data flows through our applications
  • Higher-order functions and applicative programming and how they remove complexity from imperative-style programming e.g. for-loops
  • Functions as building blocks and how to compose functio
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 29, 2025 22:13
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname