Skip to content

Instantly share code, notes, and snippets.

View aronj's full-sized avatar

Aron Janarv aronj

  • Stockholm, Sweden
View GitHub Profile
@aronj
aronj / update_curl.sh
Last active May 9, 2018 11:58 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.59.0.tar.bz2
tar -xvjf curl-7.59.0.tar.bz2
@aronj
aronj / selection-to-clipboard
Last active November 20, 2016 15:17
urxvt selection to clipboard
#!/usr/bin/env perl
# save as /usr/lib/urxvt/perl/clipboard
# in .Xdefaults: URxvt.perl-ext-common: default,matcher,selection-to-clipboard
sub on_sel_grab {
my $text = quotemeta $_[0]->selection;
$text =~ s/\n/\\n/g;
$text =~ s/\r/\\r/g;
system("echo $text|xclip -i -selection clipboard");