Skip to content

Instantly share code, notes, and snippets.

View ivan's full-sized avatar
🕸️

Ivan Kozik ivan

🕸️
View GitHub Profile
@ivan
ivan / local.conf
Created November 30, 2015 03:52
~/.config/font-manager/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer><family>PragmataPro Mono</family></prefer>
<default><family>PragmataPro Mono</family></default>
</alias>
<alias>
<family>serif</family>
#!/usr/bin/python
import sys
import json
obj = json.load(sys.stdin)
def fix_save_path(p):
p = p.replace('\\', '/')
if p[1:3] == ':/':
p = '/mnt/' + p[0] + '/' + p[3:]
grab-site improvement plan
===
gs-server --upstream= to forward crawl activity to another gs-server
Implement a login form on the dashboard that writes a user:password to a cookie
dashboard ignore context menu: make dashboard send control messages to the server
server should reply with success/fail
fail should show highly visible error at the top of the dashboard
2015-12-24T18:10:43Z CLONE 141320 gabriel/yajl-objc
remote: warning: refname '57ad43b853f069953c702c5f5d1f639e576a214c' is ambiguous.
remote: Git normally never creates a ref that ends with 40 hex characters
remote: because it will be ignored when you just specify 40-hex. These refs
remote: may be created by mistake. For example,
remote:
remote: git checkout -b $br $(git rev-parse ...)
remote:
remote: where "$br" is somehow empty and a 40-hex ref is created. Please
remote: examine these refs and maybe delete them. Turn this message off by
@ivan
ivan / fib.rs
Created January 10, 2016 03:42
extern crate num;
use num::{BigUint, Zero, One};
use std::mem::replace;
struct Fib {
f1: BigUint,
f2: BigUint
}
@ivan
ivan / gutter.js
Last active May 11, 2016 10:22
IRCCloud nick gutter
// ==UserScript==
// @name Fix IRCCloud
// @namespace fixirrcloud
// @include *://www.irccloud.com/*
// @grant none
// ==/UserScript==
var styles = `
/* Normal message lines */
.authorWrap {
@ivan
ivan / irccloud.js
Last active July 31, 2016 08:49
Align irccloud nick gutter and tweak default theme
// ==UserScript==
// @name Fix IRCCloud
// @namespace fixirrcloud
// @include *://www.irccloud.com/*
// @grant none
// ==/UserScript==
var styles = `
/* Normal message lines */
.authorWrap {
@ivan
ivan / elixir-fonts.js
Last active July 13, 2016 03:15
Userscript to fix fonts on elixir-lang.org, normalizing font sizes in Getting Started and /docs/
// ==UserScript==
// @name Fix fonts sizes on elixir-lang.org
// @namespace elixirfonts
// @include *://elixir-lang.org/*
// @version 1
// @grant none
// ==/UserScript==
var styles = `
body, .content-inner {
To get a tmux that doesn't lock up, install the tmux from Ubuntu 14.04:
# wget http://mirrors.kernel.org/ubuntu/pool/main/t/tmux/tmux_1.8-5_amd64.deb
# sha256sum tmux_1.8-5_amd64.deb
42b81ef117d9761e9dbf1c5bdb232eaf759b698137c80b0dd61444742c946ebe tmux_1.8-5_amd64.deb
# apt-get install ./tmux_1.8-5_amd64.deb
# echo "tmux hold" | sudo dpkg --set-selections
@ivan
ivan / safe-rsync.fish
Last active October 7, 2017 19:59
rsync function in fish that strips trailing slashes from arguments
# rsync, like BSD cp, interprets trailing slashes as "copy the contents of this
# directory". But this interacts very badly with fish, which, unlike zsh, always
# adds a trailing slash when you complete a directory. This rsync function
# fixes this behavior by stripping all trailing slashes. You can still copy the
# contents of a directory by appending "/." instead of "/".
function rsync --wraps rsync
# Don't break fish's rsync completions with our slash-stripping
# https://github.com/fish-shell/fish-shell/issues/3337
if status --is-command-substitution
command rsync $argv