Skip to content

Instantly share code, notes, and snippets.

View rrrodrigo's full-sized avatar

Marcin Bajer rrrodrigo

View GitHub Profile
@rrrodrigo
rrrodrigo / rotate-nginx-log.sh
Created November 16, 2011 16:21
Rotation of Nginx logs with a twist
#!/bin/bash
YEAR=`date "+%Y"`
MONTH=`date "+%m"`
DAY=`date "+%d"`
LOG_FILES="access.log error.log"
DATE=$YEAR/$MONTH/$DAY
@rrrodrigo
rrrodrigo / instagram-download.txt
Created April 10, 2012 11:45
How to download all your Instagram pictures in highest resolution without using any API
Following the news about Facebook buying Instagram I decided to delete my Instagram account before Facebook claims ownership of my pictures.
Since the Instagram-recommended (in their FAQ): http://instaport.me/export doesn't work for me (probably they can't cope with the high demand),
here is a quick and dirty way to download all my Instagram pictures in their highest resolution in a few easy steps.
You will need: Firefox, Firebug, some text editor, wget
1. Go to http://statigr.am/yourlogin using Firefox with Firebug extension active
2. Scroll down as many times as it is needed to have all yor pictures thumbnails displayed (I had some 3 hundred pictures so it was not that much scrolling, YMMV)
3. In the Firebug JS console run this JS code: $(".lienPhotoGrid a img").each(function(index) { console.log($(this).attr('src')) })
4. JS console will contain urls to all the thumbnails images, like this: http://distilleryimage1.s3.amazonaws.com/4ed46cf2801511e1b9f1123138140926_5.jpg
@rrrodrigo
rrrodrigo / ADIF2CSV.rb
Created February 9, 2013 20:16
converts SOTA chaser ADIF files into CSV suitable for importing into http://database.sota.org.uk/
my_call = ARGV[1]
adif_file = File.open(ARGV[0], "r").read
csv_file = File.open(ARGV[0]+".csv", "a+")
body = adif_file.split("<eoh>")[1]
reports = body.split("<eor>")
reports.pop
# csv_header = "My Call,Date,Time,Full reference,Band,Mode,Station worked,Notes\n"
@rrrodrigo
rrrodrigo / gist:5848605
Created June 24, 2013 08:38
batch conversion of DCM images (medical diagnostics imagery, like MR scans) to JPEG, using ImageMagick
# to make sure a file is a DCM use identify
identify 00000031
00000031 DCM 512x512 512x512+0+0 8-bit sRGB 527KB 0.000u 0:00.000
# then set permissions and rename accordingly
chmod 600 * ; rename 's/(.*)/$1.dcm/' *
# then perform the conversion
class ElasticsearchAT23 < Formula
desc "Distributed search & analytics engine"
homepage "https://www.elastic.co/products/elasticsearch"
url "https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.0/elasticsearch-2.3.0.tar.gz"
sha256 "d68482c7633f2986263bc5f11f93b8a58c54c6cf5e337b615446d0a7c6fdcd8b"
head do
url "https://github.com/elasticsearch/elasticsearch.git"
depends_on :java => "1.8"
depends_on "gradle" => :build
@rrrodrigo
rrrodrigo / keybase.md
Created December 9, 2019 15:14
Keybase proof

Keybase proof

I hereby claim:

  • I am rrrodrigo on github.
  • I am rrrodrigo (https://keybase.io/rrrodrigo) on keybase.
  • I have a public key ASC-pp3I0s-r5lUZj2H2fu1oeKxyLgqjHnsYldW5pefjoAo

To claim this, I am signing this object: