Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
(require 'iimage)
(autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
(autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t)
(add-to-list 'iimage-mode-image-regex-alist '("@startuml\s+\\(.+\\)" . 1))
;; Rendering plantuml
(defun plantuml-render-buffer ()
(interactive)
(message "PLANTUML Start rendering")
(shell-command (concat "java -jar ~/Downloads/plantuml.jar "
--- vim73_compile_diffs\enable_python26\build_vim_original.bat 2011-03-01 14:49:28 +0000
+++ vim73_compile_diffs\enable_python26\build_vim.bat 2011-03-01 15:13:56 +0000
@@ -1,8 +1,8 @@
@echo off
REM ------- specify Vim /src folder ----------------
-set VIMSRC=E:\devel\vim73\src
+set VIMSRC=E:\temp\vim\vim73\src
REM ------- add MinGW /bin directory to PATH -------
-PATH = %PATH%;E:\MinGW\bin;
+PATH = %PATH%;H:\MinGW\bin;H:\PortablePython_1.1_py2.6.1\App
@573
573 / feature_h_patch.diff
Created March 2, 2011 15:04
Custom adaptions to the feature.h file from vim sources as recommended here: http://vim.wikia.com/wiki/Build_Python-enabled_Vim_on_Windows_with_MinGW
--- E:\temp\vim\vim73\src\feature_original.h 2011-03-01 13:58:38 +0000
+++ E:\temp\vim\vim73\src\feature.h 2011-03-01 15:30:11 +0000
@@ -1239,7 +1239,8 @@
# if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
&& defined(HAVE_X11_XPM_H)) \
|| defined(FEAT_GUI_GTK) \
- || (defined(WIN32) && defined(FEAT_GUI))
+ || (defined(WIN32) && defined(FEAT_GUI)) \
+ || defined(FEAT_NORMAL)
# define FEAT_SIGN_ICONS
@573
573 / dng_validate_cpp_changes.diff
Created March 22, 2011 15:23
Changes applied to dng_validate.cpp to prepare for csv output of r-, g- and b-values. Applies to dng_sdk version 1.3 from Adobe.
--- E:\temp\dng_sdk_1_3\dng_sdk\source\dng_validate.cpp_original 2009-06-22 13:07:00 +0000
+++ E:\temp\dng_sdk_1_3\dng_sdk\source\dng_validate.cpp 2011-03-22 15:25:46 +0000
@@ -63,6 +63,7 @@
static dng_string gDumpStage3;
static dng_string gDumpTIF;
static dng_string gDumpDNG;
+static dng_string gDumpTXT;
/*****************************************************************************/
@roman
roman / Github.hs
Created September 16, 2011 18:11
Experiments with Github + Redis + Haskell
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Failure (Failure(..))
import Control.Monad.Trans (MonadIO, liftIO, lift)
import Control.Monad.IO.Control (MonadControlIO)
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@orclev
orclev / trie.hs
Created February 28, 2012 04:23
Haskell trie implementation
import Data.Maybe
import Control.Monad (liftM)
import Data.List (isPrefixOf)
import qualified Data.Map as M
import qualified Data.Foldable as F
-- | Trie container data type
data Trie a = Trie { value :: Maybe a
, children :: M.Map Char (Trie a) }
deriving (Show)
@573
573 / gist:1956800
Created March 2, 2012 08:34
Install the nokogiri xml module on a rubyinstaller based setup in win32 (history of commands issued at my cmd.exe prompt to achieve this)
:: First installed devkit from rubyinstaller page to E:\Programme\DevKit
:: Then installed Ruby193 from rubyinstaller page to E:\Programme\Ruby193
:: opened cmd.exe prompt
pushd E:\Programme\DevKit
set PATH=E:\Programme\Ruby193\bin;%PATH%
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
gem install rdiscount --platform=ruby
ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a