Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonas Berlin xkr47

View GitHub Profile
@AntonFriberg
AntonFriberg / fonts.conf
Created Jun 4, 2017
Debian better font rendering
View fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
@egel
egel / git-prompt.sh
Created Oct 10, 2015
Bash git prompt (show current git branch in prompt)
View git-prompt.sh
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
View debug-gulp-stream-content.js
var through = require('through2');
function task () {
return gulp.src([ some, files ])
.pipe(concat('app.css'))
.pipe(through.obj(function (chunk, enc, callback) {
console.log(chunk.contents.toString())
this.push(chunk);
callback();
}));
@kimmoli
kimmoli / myclass.cpp
Last active Aug 29, 2015
Cover animation disable
View myclass.cpp
#include <QDBusConnection>
...
QDBusConnection::sessionBus().connect("", "/com/jolla/lipstick", "com.jolla.lipstick", "coverstatus",
this, SLOT(handleCoverstatus(const QDBusMessage&)));
...
void myclass::handleCoverstatus(const QDBusMessage& msg)
{
QList<QVariant> args = msg.arguments();
m_coverStatus = args.at(0).toInt();
View browserify_for_webpack_users.markdown

browserify for webpack users

There's been a strange explosion in misinformation about browserify recently, particularly in comparisons to webpack.

Generally speaking, most of this confusion stems from how webpack is more willing to pull features into its core to ease discoverability while browserify is more likely to push features out to userland instead.

I think that longer-term, separability has more benefits from a maintenance and

@staltz
staltz / introrx.md
Last active Dec 1, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
@wandernauta
wandernauta / sp
Last active Nov 30, 2020
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
View sp
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@mat813
mat813 / gandi.rb
Last active Feb 28, 2019
OpenDNSSEC to Gandi
View gandi.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
# ods-ksmutil key export --keystate ready -t KSK --all | ruby gandi.rb ready
# ods-ksmutil key export --keystate retire -t KSK --all | ruby gandi.rb retire
require 'pp'
require 'rubygems'
require 'dnsruby'
require 'xmlrpc/client'
You can’t perform that action at this time.