Skip to content

Instantly share code, notes, and snippets.

@carlos22
carlos22 / rangequery.sh
Last active September 4, 2015 13:22 — forked from jprante/rangequery.sh
Range query example
curl -XDELETE 'localhost:9201/test'
curl -XPUT 'localhost:9201/test/data/1' -d '
{
"valid_start":[11,23,13,16,17,23.6],
"valid_end":[110,230,130,160,170,230.6]
},
'
@carlos22
carlos22 / sequel
Last active August 29, 2015 14:21
sudo gem install sequel mysql sqlite3
sequel mysql://user:password@host/database -C sqlite://db.sqlite
cat img.svg | base64 | tr -d '\n' | xsel --clipboard
@carlos22
carlos22 / install-imapsync.sh
Last active July 4, 2018 10:01
Install imapsync on Ubuntu 14.04 (trusty)
#!/bin/bash
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install makepasswd rcs perl-doc libio-tee-perl git libmail-imapclient-perl libdigest-md5-file-perl libterm-readkey-perl libfile-copy-recursive-perl build-essential make automake libunicode-string-perl
cd $HOME
git clone git://github.com/imapsync/imapsync.git --depth 1
cd imapsync
sudo make install
@carlos22
carlos22 / carddav2vcf.sh
Last active August 29, 2015 14:17
carddav2vcf
#!/bin/bash
# args
if [ "$#" -eq 0 ];then
echo "$0 <url> <user> <file.vcf>";
exit 3;
fi
DAVURL="$1";
DAVUSER="$2";
@carlos22
carlos22 / spotify-admute.sh
Last active August 26, 2016 11:15 — forked from pcworld/_README.md
works with 0.9.1.55.gbdd3b79f (ubuntu 12.04 german locale)
#!/bin/bash
# Updated from https://gist.github.com/pcworld/3198763/#comment-857143
# added launch of spotify and made it working on non-english envs (2013-10-08)
# works with 0.9.1.55.gbdd3b79f (ubuntu 12.04 german locale)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # http://stackoverflow.com/a/246128
was_paused=0 # if last state was paused
ad=0 # if an ad is probably playing right now
@carlos22
carlos22 / transfer_marks.py
Created July 20, 2011 17:52
LSF Noten Mapping
#!/usr/bin/python
#
# LSF Noten Mapping
#
# use openoffice or catdocs xls2csv [sudo apt-get install catdoc] - note: its broken in ubuntu natty
#
import csv
import sys
DELIMITER=','
QUOTECHAR='"'