Skip to content

Instantly share code, notes, and snippets.

@x3ro
x3ro / README.md
Created November 3, 2012 00:40 — forked from mbostock/.block
Donut Chart

This donut chart is constructed from a CSV file storing the populations of various age groups. The chart employs a number of D3 features:

@x3ro
x3ro / foo.sh
Created November 23, 2015 09:18
git submodule rewriting foo
git clone https://github.com/x3ro/automate sub &&
wget https://gist.githubusercontent.com/x3ro/6242017/raw/8fe69f096062f3f2b1858bcc816be5eb89d15535/git-rewrite-to-subfolder &&
chmod +x git-rewrite-to-subfolder &&
cd sub &&
../git-rewrite-to-subfolder
@x3ro
x3ro / git-foobar.sh
Created November 25, 2015 11:26
Script which shows other commits that touch a file introduced by the given commit
# Didn't find a good name for this yet :D
function git-foobar {
COMMITS=$(git diff-tree --no-commit-id --name-only -r --diff-filter=A $1 | \
xargs git log --pretty="%H" -- | \
uniq | \
grep --invert-match $(git rev-parse $1))
if (( $(echo -n "$COMMITS" | wc -l) > 0 )); then
echo "$COMMITS" | xargs git show --stat
fi
@x3ro
x3ro / gist:4564672
Created January 18, 2013 13:53
Patch that fixes filter box viewing on iPad devices for roundcube mail (managesieve plugin)
From 5e71ad70ee4beb06c05b51f2c560f75a086bfe8a Mon Sep 17 00:00:00 2001
From: root <root@go26.gosign.de>
Date: Fri, 18 Jan 2013 14:51:28 +0100
Subject: [PATCH] Fix filter box not showing entirely on iPad
---
plugins/managesieve/skins/larry/managesieve.css | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css
# A little modification to Wynn Netherland's (http://wynnnetherland.com/journal/a-stylesheet-author-s-guide-to-terminal-colors)
# "git n" alias which allows one to specify a subdirectory.
[alias]
n = !"f() { git ls-files $1 | xargs notes | awk -F: '{ print $1,$2; print $3,$4; print $5}' | grcat conf.notes | less -r; }; f"
@x3ro
x3ro / gist:6274616
Last active December 21, 2015 07:58
draft.sx
Hello visitor. This is a fork of [@idan](https://github.com/idan)'s [gist.io](http://gist.io) project, adding a couple new features and fixing some bugs that have not been touched for a while. Idan intends to keep on working on the original gist.io, for which, at some point, he wants to charge a bit of money in order to even out the server costs ([source](https://github.com/idan/gistio/issues/55#issuecomment-22453283)), but he's currently unclear when that will be. At least until then, I will work on my own improvements, which might some day make it back into upstream :)
# Features added
## Callouts
> You can now use callouts, which are great to draw attention to specific, important sections of your text:
Hi Lucas.
I know that you have high-rated account on stackoverflow.
I want you to do a undelete vote for a very good and useful
question. It's really nice. I don't know why somebody deleted
it, but I want to revert it.
If you will do it, I will pay you $30 on your paypal account.
Or you can suggest another way of payment.
upstream gitlab {
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}
server {
listen 80 default_server;
server_name <change this to your FQDN>;
rewrite ^ https://$server_name$request_uri? permanent;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
@x3ro
x3ro / keybase.md
Last active September 6, 2016 14:15

Keybase proof

I hereby claim:

  • I am x3ro on github.
  • I am fresskoma (https://keybase.io/fresskoma) on keybase.
  • I have a public key ASCWLW8_UfKTpsTWuji76j_UfzJ2PIRkKRKiV-tcNrpa8Ao

To claim this, I am signing this object: