Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / ren2origdate.bat
Created June 25, 2012 09:30
Renames *.jpg files according to shooting time data (EXIF)
@ECHO OFF
:: Taken from section "Processing Single Line Output" (http://www.imagemagick.org/Usage/windows/#single)
:: You need to set PATH=h:\ImageMagick-XXX-Q16-windows;%PATH% first
:: This script, when run in a directory of *.jpg files does the following for each of them:
:: Prints the file name
:: Retrieves EXIF data about original shooting time digitized down to partials of seconds
:: (for continuous shootings) and renames the file according to that data, not asking if
:: a file of that new name already exists (DANGEROUS, use move /-Y to ask each time).
@573
573 / gist:3112571
Created July 14, 2012 18:35
Test for Graphics.UI.SDL (for SDL binding library on hackage)
import qualified Graphics.UI.SDL as SDL
import qualified Graphics.UI.SDL.Events as E
main :: IO ()
main = do
SDL.init [SDL.InitEverything]
SDL.setVideoMode 640 480 32 []
SDL.setCaption "Video Test!" "video test"
eventLoop
SDL.quit
Building hsSDL on Win32
-----------------------
Bit Connor <[email protected]>
This is how I managed to get hsSDL working on Windows XP.
I used GHC version 6.6.1
1. Download the SDL mingw development package from the SDL website
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@573
573 / gist:3907433
Created October 17, 2012 19:02
environment variables for glfw-b (~/.bashrc.d/glfw-b.bashrc)
#!/bin/env bash
case $PATH in *\/h\/glfw\/lib-mingw\/x86*) PATH=${PATH:+/h/glfw/lib-mingw/x86:${PATH//\/h\/glfw\/lib-mingw\/x86/}};; esac
case $PATH in \
*) PATH=${PATH:+${PATH}:/h/glfw/lib-mingw/x86};; \
esac
case $PATH in *::*) PATH=${PATH//::/:};; esac
@573
573 / gist:3907478
Created October 17, 2012 19:10
~/.bashrc file for using *.bashrc files inside a ~/.bashrc.d folder to load different stuff for a shell session - environment etc.
# To pick up the latest recommended .bashrc content,
# look in /etc/defaults/etc/skel/.bashrc
# Modifying /etc/skel/.bashrc directly will prevent
# setup from updating it.
# The copy in your home directory (~/.bashrc) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benificial to all, please feel free to send
@573
573 / gist:3907562
Created October 17, 2012 19:23
GLFW-b test file (lesson02.hs)
--
-- This code was created by Jeff Molofee '99 (ported to Haskell GHC 2005)
--
-- source: https://github.com/dagit/nehe-tuts/blob/3bfebb167596a47b4a0e2ac36ef86df36ca65f18/lesson02.hs
--
module Main where
import qualified Graphics.UI.GLFW as GLFW
-- everything from here starts with gl or GL
@573
573 / gist:3926453
Created October 21, 2012 09:09
To access services from the qemu client os from a microsoft os instance running qemu you can start a batch file containing
@echo off
pushd %qemudir%
:: This call is an example only, customize the paths:
call :start_the_machines "d:/grml_2009.05.iso" "d:/basehd.qc2" "d:/lvmhd.qc2"
goto :eof
:: start_the_machines isofile hdimage1 hdimage2
:start_the_machines %1 %2 %3
set hdX=-drive file=%2,index=0,media=disk -drive file=%3,index=1,media=disk
@573
573 / gist:3938881
Created October 23, 2012 13:56
The RunHello.java file (JPF)
/** RunHello.java */
package simple.simphony.plugin;
import repast.simphony.data.analysis.AnalysisPluginRunner;
@SuppressWarnings("serial")
public class RunHello extends AnalysisPluginRunner {
public RunHello() {
super("Hello", null, null, new HelloWizard());
}
}
@573
573 / gist:3938898
Created October 23, 2012 13:59
The HelloWizard.java file (JPF)
/** HelloWizard.java */
package simple.simphony.plugin;
import javax.swing.JOptionPane;
import repast.simphony.data.analysis.NetworkAnalysisPluginWizard;
public class HelloWizard extends NetworkAnalysisPluginWizard {
public HelloWizard() {
super(null);
JOptionPane.showMessageDialog(null, "HelloWizard initialized");
}
}