Skip to content

Instantly share code, notes, and snippets.

View noniq's full-sized avatar

Stefan Daschek noniq

View GitHub Profile
@noniq
noniq / gist:1506136
Created December 21, 2011 13:54
Droplet for converting Word documents to PDF and adding a background.
property homeDir : POSIX path of (path to home folder)
on changeFileNameExtension(fileName, newExtension)
tell application "Finder" to set oldExtension to "." & name extension of alias fileName
set baseName to characters 1 thru ((offset of oldExtension in fileName) - 1) of fileName
return (baseName as string) & newExtension
end changeFileNameExtension
on convertWordFileToPdf(wordFile)
tell application "Finder" to set fileName to wordFile as string
@noniq
noniq / gist:1044475
Created June 24, 2011 09:15
Patch trying to make akephalos kill its remote process correctly on windows
diff --git a/akephalos.gemspec b/akephalos.gemspec
index 1eee36a..ffbc980 100644
--- a/akephalos.gemspec
+++ b/akephalos.gemspec
@@ -22,6 +22,9 @@ Gem::Specification.new do |s|
if RUBY_PLATFORM != "java" && ENV["PLATFORM"] != "java"
s.add_runtime_dependency "jruby-jars"
end
+ if RUBY_PLATFORM =~ /mingw32/
+ s.add_runtime_dependency "win32-process"
@noniq
noniq / changes.diff
Created March 25, 2011 14:52
We use subversion's commit-email.pl script to send info about our commits to flowdock. We customized the script so that the subject contains the first line of the log message, and the from field contains the name of the author.
Index: D:/lib/scripts/commit-email.pl
===================================================================
--- D:/lib/scripts/commit-email.pl (revision 13)
+++ D:/lib/scripts/commit-email.pl (revision 294)
@@ -39,6 +39,7 @@
use strict;
use Carp;
use POSIX qw(strftime);
+use MIME::Base64;
my ($sendmail, $smtp_server);
@noniq
noniq / logical.pl
Last active October 22, 2016 21:29
% Lösung des aktuellen (04/2010) P.M.-LogikRätsels
% ================================================
%
% http://www.pm-magazin.de/de/onlinetraining/logik_trainer/logikraetsel.asp
%
% Der Brite Samuel Farwell gehört zu jenen Pionieren des modernen Segelsports,
% die heute kaum noch jemand kennt. Mehrfach versuchte er zu Beginn des
% 20. Jahrhunderts alleine in seinem Boot die Welt zu umsegeln – ohne jemals
% dieses hoch gesteckte Ziel zu erreichen.
%