Skip to content

Instantly share code, notes, and snippets.

View KonradIT's full-sized avatar

Konrad Iturbe KonradIT

View GitHub Profile
@shurizzle
shurizzle / gist:1223923
Created September 17, 2011 13:14
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
require 'net/http'
require 'clipboard'
@Knio
Knio / encode.sh
Created September 27, 2012 05:13
Resize GOPRO images
dir=${1-.}
fps=${2-48}
if [ ! -s times.sub ]
then
find . -path "*/$dir/???GOPRO/GOPR????.JPG" -printf '%p\n' | sort | python `dirname $0`/subs.py > times.sub
fi
mplayer "mf://$dir/???GOPRO/GOPR????.JPG" -mf w=1920:h=1080:fps=$fps:type=jpg -ao null -benchmark -vo yuv4mpeg:file=>(x264 --demuxer y4m --crf 21 --preset fast --muxer mkv --output GOPRO.MKV -) -vf scale=1920:-3,flip,mirror,crop=1920:1080:0:0,pp=al -sub times.sub
@vasmani
vasmani / gist:5748134
Last active December 18, 2015 07:39
raspberry pi && gopro for time lapse
pi@raspberrypi ~/public_html/gopro $ cat take_picture_and_send.sh
#!/bin/bash
## volume 100%
curl "http://10.5.5.9/camera/BS?t=goprohero&p=%02"
sleep 1
## mode to photo
curl "http://10.5.5.9/camera/CM?t=goprohero&p=%01"
sleep 1
## take picture
curl "http://10.5.5.9/bacpac/SH?t=goprohero&p=%01"
@degliwe
degliwe / AndroidWearBackground
Created July 6, 2014 15:34
This is how to display a nice background on Android Wear notification instead of a plain color or a pixelated icon
int notificationId = 001;
// Create a WearableExtender to add functionality for wearables
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setBackground(bigBitmap);
// Build the notification
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
@vjo
vjo / gopro-timelapse.sh
Last active February 20, 2016 14:06
Sort my gopro timelapse photos and convert it in a movie with ffmpeg
# Create a directory where to move your renamed photos
mkdir img
# Rename your first G0....JPG photos in img/img000001.JPG and so on
x=1;for i in G0*JPG; do counter=$(printf %06d $x); ln "$i" img/img"$counter".jpg; x=$(($x+1)); done
# Rotate photos if needed
cd img
for file in *.jpg; do convert $file -rotate 180 rotated-$file; done
@markusfisch
markusfisch / tweet.sh
Last active March 25, 2016 10:54
Shell script to tweet from the command line. Breaks longer messages into multiple tweets. Requires curl.
#!/usr/bin/env bash
# Post a tweet
#
# @param ... - tweet
tweet()
{
# Make a SSL request
#
# @param ... - request arguments
@C-D-Lewis
C-D-Lewis / get-sdks.js
Created December 11, 2016 20:18
Download all Pebble SDK core packages
var request = require('request');
var https = require('https');
var fs = require('fs');
var URL = 'https://sdk.getpebble.com/v1/files/sdk-core';
var OUTPUT_DIR = './sdks';
if(!fs.existsSync(OUTPUT_DIR)){
fs.mkdirSync(OUTPUT_DIR);
}
@codeanticode
codeanticode / GoProKeepAlive.pde
Created August 11, 2016 23:43
Processing sketch to keep the GoPro alive
import java.net.Socket;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
void setup() {
thread("keepAlive");
@racerxdl
racerxdl / shutter.py
Created September 17, 2014 16:37
Remote GoPro SHutter and File downloader for GoPro Cameras
#!/usr/bin/env python
import urllib
from urllib import urlencode
import urllib2
from time import sleep
import os
from subprocess import Popen, PIPE
import Image
from cStringIO import StringIO
import signal
@timhughes
timhughes / stabilize.sh
Created January 14, 2018 23:06
Stabilize my GoPro videos
#! /bin/sh
#
# stabilize.sh
#
fullfile=$(readlink -f $1)
dir_name=$(dirname $fullfile)
filename=$(basename $fullfile)
file_no_ext=${filename%.*}
extension="${filename##*.}"