Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / gist:3942268
Created October 23, 2012 22:46
For later reference, libsvm .dll and .a file building on win32

In a ghci session (doing this way for autodidactical reasons):

:module +System.Process
createProcess (proc "mingw32-make.exe" ["dll"]) { env = Just ( ("PATH", "C:/PROGRA~2/HASKEL~1/201220~1.0/mingw/bin;h:/mingw/bin"):[] ) }

Will build the libsvm.dll file for runtime use in ghci.

For the .a file I did (PATH setting this order to first find the g++ tools coming with Haskell Platform itself, then the remaining mingw+msys-bundled mingw32-make):

:module +System.Process

@573
573 / gist:3945596
Created October 24, 2012 11:35
Visual Studio 2010 Express prompt with Platform SDK v7.1
@echo off
:: file: VS10_Command_Prompt.bat, call i. e. with x86 as argument
title Open Visual Studio 2010 Express prompt with Platform SDK v7.1
if not exist "C:\Programme\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto missing
echo call "C:\Programme\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %1
call "C:\Programme\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %1
:: Platform SDK:
@573
573 / gist:3945616
Created October 24, 2012 11:39
CMakeLists.txt fΓΌr Microsoft Visual C++ 2010 Express Edition
# file: CmakeLists.txt
# Is for generating Makefile etc. for a VC++ 2010 Express Win32 App
cmake_minimum_required(VERSION 2.8.1)
# But, target isn't the same as executable name! Use output_name for the latter
set(TARGET TaskBoxEx)
set(CMAKE_CXX_FLAGS_RELEASE_DEFAULTS "/MD /O2 /Ob2 /D NDEBUG")
project (${TARGET})
@573
573 / gist:3973185
Created October 29, 2012 12:01
Needed changes to Setup.hs of wxcore-0.13.2.3 for non-unicode, to make wx-config running.
--- D:\temp\wxcore-0.13.2.3\Setup.hs Mon Oct 29 11:26:28 2012
+++ C:\Users\daniel\AppData\Local\Temp\VIB57C3.tmp Mon Oct 29 11:57:21 2012
@@ -50,11 +50,11 @@
-- ver <- fmap (head . drop 1 . splitBy (== '.')) (readProcess "wx-config" ["--version"] "")
let extra_wx_libs = if os == "mingw32"
- then [ "-lwxmsw28ud_media", "-lwxmsw28ud_richtext", "-lwxmsw28ud_aui"
- , "-lwxmsw28ud_xrc", "-lstdc++" ]
+ then [ "-lwxmsw28_media", "-lwxmsw28_richtext", "-lwxmsw28_aui"
+ , "-lwxmsw28_xrc", "-lstdc++" ]
@573
573 / gist:3973225
Created October 29, 2012 12:18
environment variables for haskell wx bindings (~/.bashrc.d/wxhaskell.bashrc)
#!/bin/env bash
# for 2.9 at the moment
# wx-config (http://sourceforge.net/projects/wxhaskell/files/wx-config-win/wx-config.exe/download) is in /usr/local/bin
case $PATH in *\/h\/mingw\/msys\/1.0\/local\/bin*) PATH=${PATH//\/h\/mingw\/msys\/1.0\/local\/bin/};; esac
# the built wx-based haskell-bound exe should find the DLL's
case $PATH in *\/z\/wxWidgets\/lib\/gcc_dll*) PATH=${PATH//\/z\/wxWidgets\/lib\/gcc_dll/};; esac
# some of the built wx-based haskell-bound exe might need the wxc.dll from the hackage-package wxc, TODO make more generic
@573
573 / gist:3973235
Created October 29, 2012 12:20
environment variables for haskell (~/.bashrc.d/haskell.bashrc) on windows(tm)
#!/bin/env bash
case $PATH in *\/c\/Programme\/Haskell\ Platform\/2012\.2\.0\.0\/lib\/extralibs\/bin*) PATH=${PATH//\/c\/Programme\/Haskell\ Platform\/2012\.2\.0\.0\/lib\/extralibs\/bin/};; esac
case $PATH in *\/c\/Programme\/Haskell\ Platform\/2012\.2\.0\.0\/bin*) PATH=${PATH//\/c\/Programme\/Haskell\ Platform\/2012\.2\.0\.0\/bin/};; esac
case $PATH in *\/c\/Programme\/Haskell\/bin*) PATH=${PATH//\/c\/Programme\/Haskell\/bin/};; esac
case $PATH in *\/c\/Users\/daniel\/AppData\/Roaming\/cabal\/bin*) PATH=${PATH//\/c\/Users\/daniel\/AppData\/Roaming\/cabal\/bin/};; esac
@573
573 / gist:4252598
Created December 10, 2012 19:02
My modifications to http://wxpack.svn.sourceforge.net/viewvc/wxpack/trunk/wxBuild_wxWidgets.bat?revision=134&view=markup to compile wxWidgets 2.9.4 on Windows 7 with mingw (D:/wxBuild_wxWidgets.bat contained local copy of original)
--- D:/wxBuild_wxWidgets.bat Mon Dec 10 19:32:01 2012
+++ Z:/wxWidgets/build/msw/wxBuild_wxWidgets.bat Fri Dec 07 17:48:39 2012
@@ -29,8 +29,8 @@
set WXBUILD_VERSION=1.12
set WXBUILD_APPNAME=wxBuild_wxWidgets
:: MinGW Gcc install location. This must match your systems configuration.
-set GCCDIR=C:\MinGW
-set GCC4DIR=C:\MinGW4
+set GCCDIR=h:\MinGW
+set GCC4DIR=h:\MinGW
@573
573 / gist:4252825
Created December 10, 2012 19:43
The command I run on cmd console to build the different library variants of wxWidgets 2.9.4
@echo off
for %%i in (LIB_DEBUG LIB_DEBUG_UNICODE LIB_DEBUG_MONO LIB_DEBUG_MONO_UNICODE LIB_RELEASE LIB_RELEASE_UNICODE LIB_RELEASE_MONO LIB_RELEASE_MONO_UNICODE DLL_DEBUG DLL_DEBUG_UNICODE DLL_DEBUG_MONO DLL_DEBUG_MONO_UNICODE DLL_RELEASE DLL_RELEASE_UNICODE DLL_RELEASE_MONO DLL_RELEASE_MONO_UNICODE) do echo wxBuild_default.bat MINGW4 NULL %%i
@573
573 / gist:4985695
Created February 19, 2013 13:06
Filmempfehlungen
DJANGO unchained OmU
Ohne Limits
Lord Of the Weed
Star Trek Sinnlos
@573
573 / gist:5006011
Created February 21, 2013 16:36
How I managed to register at tumblr.com finally.
A nine mails odysee over three days with the tumblr team, was ended up by their advice to find out for myself some proxy settings that fit, background: in my last mail sent them, I had to put a "tracert tumblr.com" result, latter which revealed timeout problems between the franfurt node and some us-based (east side) node.
Finally i decided to give the whole thing a last try with the "firefox tor bundle", latter which is targeted rather for privacy concerned browsing.
After some minor and thankfully well documented gpg4win-configuration work - only needed for checking the integrity of the installer package - i was finally able to fulfill the tumblr.com registration process w/o the annoying / misleading "email not correct" error message.
thanx tor bundle developers!