Skip to content

Instantly share code, notes, and snippets.

View seb-thomas's full-sized avatar
💭
😷

Sebastian Thomas seb-thomas

💭
😷
View GitHub Profile
#Horizontal
mv */static_image/*horizontal.tif .
tif2jpg.sh
for i in *.jpg; do convert $i -quality 50% $i; done
for i in *.jpg; do [[ "$i" = *_* ]] && mv -v "$i" "${i//_/-}"; done
#Vertical
mv */static_image/*vertical.tif .
tif2jpg.sh
for i in *.jpg; do convert $i -quality 50% $i; done
convert image.tif[0] +profile 8bim -density 72 image.jpg
convert image.jpg -resize 2270x1512 image_resize.jpg
convert image_resize.jpg -gravity South -extent 1568x878+0+100 image_done.jpg
composite -gravity South vignette.png image_done.jpg image_comp.jpg
@seb-thomas
seb-thomas / gist:6123677
Created July 31, 2013 16:33
/* Based on the krpano iOS 4.2 gyroscope script by Aldo Hoeben / fieldofview.com contributions by Sjeiti / ronvalstar.nl Port for Pano2VR Thomas Rauscher / gardengnomesoftware.com
/*
Based on the krpano iOS 4.2 gyroscope script
by Aldo Hoeben / fieldofview.com
contributions by Sjeiti / ronvalstar.nl
Port for Pano2VR
Thomas Rauscher / gardengnomesoftware.com
This software can be used free of charge and the source code is available under a Creative Commons Attribution license:
http://creativecommons.org/licenses/by/3.0/
@seb-thomas
seb-thomas / gist:6123675
Created July 31, 2013 16:33
/* Based on the krpano iOS 4.2 gyroscope script by Aldo Hoeben / fieldofview.com contributions by Sjeiti / ronvalstar.nl Port for Pano2VR Thomas Rauscher / gardengnomesoftware.com
/*
Based on the krpano iOS 4.2 gyroscope script
by Aldo Hoeben / fieldofview.com
contributions by Sjeiti / ronvalstar.nl
Port for Pano2VR
Thomas Rauscher / gardengnomesoftware.com
This software can be used free of charge and the source code is available under a Creative Commons Attribution license:
http://creativecommons.org/licenses/by/3.0/
@seb-thomas
seb-thomas / gist:5866518
Created June 26, 2013 10:45
Imagemagick composition for PSD files, eg, IMG_1664_shoe.psd + IMG_1664_shadow.psd
composite *shoe.psd *shadow.psd comp.jpg
function setClicker() {
var arrowClicker = $('.direction-arrows');
}
$('.direction-arrows').click( function(event){
var link = $(this).attr('href');
var elem = $('.video_thumbnails_wrapper');
console.log(link);
elem.load(link +' .video_thumbnails_wrapper', function(response, status, xhr) {
if (status == "error") {
class Box(BaseModel):
BLACK, WHITE = 0, 1
BLACK_N_WHITE = (
(BLACK, 'black'),
(WHITE, 'white'),
var notSelected = $('.field-size').find("select option:selected");
$(notSelected).each(function() {
if ($(this).text().match(/---------/)){
$(this).addClass("hidden");
}
});
@seb-thomas
seb-thomas / gist:5154064
Created March 13, 2013 16:57
errrroorrr
Requirement already satisfied (use --upgrade to upgrade): e==1.3 in /home/seb/.virtualenvs/defected/lib/python2.7/site-packages (from -r requirements.txt (line 3))
Downloading/unpacking docutils (from -r requirements.txt (line 4))
Downloading docutils-0.10.tar.gz (1.6MB): 684kB downloaded
Exception:
Traceback (most recent call last):
File "/home/seb/.virtualenvs/defected/local/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
status = self.run(options, args)
File "/home/seb/.virtualenvs/defected/local/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 256, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/seb/.virtualenvs/defected/local/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1018, in prepare_files
@seb-thomas
seb-thomas / gist:4984941
Last active December 13, 2015 22:29
Redmine issue updated?
if(typeof jQuery !== 'undefined'){
jQuery(function($) {
var dateUpdated = "";
var reDate = /(\d+)\/(\d+)\/(\d+)/;
var reIssues = /issues\/\d+/;
var titleDate = $('p.author a').last().attr('title');
var style= 'position: fixed;bottom: 0px;margin-bottom: 0px;width: 100%;padding: 12px 0px 13px 30px;background-position-y: 12px;';
var warning = '<div class="flash warning" style="'+style+'">This issue has been updated since you last saw it. <a href="javascript:location.reload(true);">Refresh now</a></div>';