This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMP_KEPLER_APK=$(mktemp) | |
echo Downloading the Kepler APK from orvibo.com into $TMP_KEPLER_APK ... | |
wget http://www.orvibo.com/software/android/kepler.apk -qO $TMP_KEPLER_APK | |
echo Download complete. Extracting and searching for the key. The key should be displayed below. | |
echo | |
ORVIBO_KEY=$(unzip -p $TMP_KEPLER_APK classes.dex | strings | grep -e '^[A-Za-n1-9]\{16\}$') | |
if [[ ! -z "$ORVIBO_KEY" ]] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Image::Magick; | |
sub get_image_orientation { | |
my $file = shift; | |
my $image = Image::Magick->new; | |
$image->Read($file); | |
my $w = $image->Get('width'); | |
my $h = $image->Get('height'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File: /usr/bin/local/image-orientation | |
test=$(convert $1 -format "%[fx:(w/h>1)?1:0]" info:) | |
if [ $test -eq 1 ]; then | |
echo horizontal | |
else | |
echo vertical | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use Path::Tiny; | |
use File::Basename; | |
foreach my $jpg (path(".")->children(qr/\.jpg$/)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0] | |
# PriorityQueue (0.1.2) | |
# | |
# Author: Valcho Nedelchev | |
# | |
require 'priority_queue' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'json' | |
def http_get(url) | |
puts "http_get: #{url}" | |
return Net::HTTP.get(URI(url)) | |
end | |
def handle_http(response, url) |