Skip to content

Instantly share code, notes, and snippets.

View dmpop's full-sized avatar
🇺🇦

Dmitri Popov dmpop

🇺🇦
View GitHub Profile
@dmpop
dmpop / mejiro.py
Last active August 29, 2015 13:56
SL4A Python script
import android, time, os, ftplib
# Specify FTP connection info
server = '127.0.0.1'
username = 'username'
password = 'password'
droid = android.Android()
if not os.path.exists('/sdcard/mejiro/'):
os.makedirs('/sdcard/mejiro/')
timestamp = time.strftime('%Y%m%d-%H%M%S', time.localtime())
droid.cameraInteractiveCapturePicture('/sdcard/mejiro/' + timestamp + '.jpg')
#!/bin/bash
# DESCRIPTION
# -----------
# The xml2exif Bash shell script extracts aperture, shutter speed, and ISO from an XML file generated by
# the Photographer's Notebook app (https://play.google.com/store/apps/details?id=unisiegen.photographers.activity)
# and writes the obtained values into the specified photo.
# DEPENDENCIES
# ------------
@dmpop
dmpop / exifwrite.sh
Created May 4, 2014 10:03
The exifwrite Bash shell script writes specified make, model, aperture, exposure time shutter speed, and ISO values to a target photo.
#!/bin/bash
#DESCRIPTION
# The exifwrite Bash shell script writes specified make, model, aperture, exposure time shutter speed, and ISO values to a target photo.
# DEPENDENCIES
# ExifTool
# To install the required package on Debian and Ubuntu, run the following command as root:
# apt-get install libimage-exiftool-perl
<html><head><style type="text/css">
<!-- body { font-family: "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif; font-size: 10pt; background-color: #eee;} -->
</style>
<?php
// A simple, minimalist, personal file/image hosting script. - version 0.5
// Only you can upload a file or image, using the password ($PASSWORD).
// Anyone can see the images or download the files.
// Files are stored in a subdirectory (see $SUBDIR).
// This script is public domain.
// Source: http://sebsauvage.net/wiki/doku.php?id=php:imagehosting
/**
* Returns an array of latitude and longitude from the Image file
* @param image $file
* @return multitype:number |boolean
*/
function read_gps_location($file){
if (is_file($file)) {
$info = exif_read_data($file);
if (isset($info['GPSLatitude']) && isset($info['GPSLongitude']) &&
isset($info['GPSLatitudeRef']) && isset($info['GPSLongitudeRef']) &&
@dmpop
dmpop / digikam_metadata.sh
Last active July 10, 2017 12:47
Bash shell script to extract camera and lense data from the digikam4.db database
#!/bin/bash
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@dmpop
dmpop / rpiremote_server.py
Last active August 29, 2015 14:14
Python Bottle server for Raspberry Pi-based IR remote control
#!/usr/bin/python
from bottle import post, route, request, run
import os, time
@route('/')
@route('/', method='POST')
def release_control():
if (request.POST.get("shutter_release")):
os.system("irsend SEND_ONCE Nikon2 shutter")
if (request.POST.get("number")):
i = 1
@dmpop
dmpop / sony_nex_release
Created February 17, 2015 16:16
Sketch for SONY NEX series cameras release
int focus_pin = 11;
int release_pin = 13;
void setup() {
pinMode(release_pin, OUTPUT);
pinMode(focus_pin, OUTPUT);
}
void loop() {
digitalWrite(focus_pin, HIGH);
#!/usr/bin/perl
# Unofficial Shoot and View Receiver for Transcend Wi-Fi SD card
# Original version: http://sourceforge.net/projects/transsvr/
# This script was developed by Sven Angelmahr
# Contact [email protected] for further details.
# DEPENDENCIES
@dmpop
dmpop / define.py
Last active August 29, 2015 14:18
QPython script to get word definitions via Google
#-*-coding:utf8;-*-
#qpy:console
#qpy:2
import androidhelper
droid = androidhelper.Android()
s = droid.dialogGetInput('Define', 'Word to define:').result
droid.startActivity('android.intent.action.VIEW', 'https://www.google.com/search?q=define:' + s)