Skip to content

Instantly share code, notes, and snippets.

@voidcontext
voidcontext / gist:6039293
Last active December 20, 2015 00:09
Monokai/Molokai themes
@voidcontext
voidcontext / .Xresources
Last active December 20, 2015 00:09 — forked from vreon/.Xresources
! Molokai theme
*xterm*faceName: "Liberation Mono"
*xterm*faceSize: 9
*xterm*background: #272822
*xterm*foreground: #f8f8f2
*xterm*cursorColor: #f8f8f2
*xterm*color0: #101010
*xterm*color1: #ed2169
*xterm*color2: #66aa11
*xterm*color3: #c47f2c
@voidcontext
voidcontext / mercurial.md
Created September 3, 2013 09:39
Mercurial cheat sheet

Mercurial cheat sheet

  • hg anno -dcu : like git blame
  • hg summary --remote : summary with unpushed/unfetched commits
@voidcontext
voidcontext / fish_prompt.fish
Created January 29, 2014 15:27
Fish shell's git prompt modified to support mercurial repos and bookmarks
function hg_prompt_update
set -e -g __hg_branch
set -e -g __hg_book
end
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
# Just calculate these once, to save a few cycles when displaying the prompt
@voidcontext
voidcontext / di.pl
Created August 27, 2014 15:57
Docker Inspect utility
#!/usr/bin/perl
# vim: expandtab ts=2 sw=2
=pod
=head1 Docker Inspect utility
usage:
docker inspect I<container_name> | di I<todo>
@voidcontext
voidcontext / add ca
Last active August 29, 2015 14:05
Add CA cert on Fedora
cp myCA.crt /usr/share/pki/ca-trust-source/anchors
update-ca-trust extract
@voidcontext
voidcontext / google-chrome
Created September 15, 2014 12:29
Fix: Google Chrome cannot determine or set the default browser.
#!/usr/bin/fish
env GNOME_DESKTOP_SESSION_ID=1 /usr/bin/google-chrome
@voidcontext
voidcontext / ovpn.pl
Last active August 29, 2015 14:07
OpenVPN client config generator
#!/usr/bin/perl
# vim: expandtab ts=2 sw=2
use warnings;
use strict;
use File::Slurp qw{read_file};
my $remote = $ARGV[0];
my $client= $ARGV[1];
-- Problem 1
sum [x | x <- [0..999], x `mod` 3 == 0 || x `mod` 5 == 0 ]
@voidcontext
voidcontext / switch-kblayout
Created January 16, 2015 09:40
Switch keyboard layout
#!/bin/bash
CURRENT=`setxkbmap -query | grep layout | awk '{print $2}'`
if [ "$CURRENT" == "us" ]; then
setxkbmap hu
else
setxkbmap us
fi