Skip to content

Instantly share code, notes, and snippets.

#! /bin/sed -f
## Markdown2Dokuwiki - reformat Markdown to Dokuwiki
## Copyright (C) 2012 Matous J. Fialka, <http://mjf.cz/>
## Released under the terms of The MIT License
## TODO: many things yet...
# reformatovani nadpisu
s/^#####/==/
@patux
patux / mediawiki-git-review-patch-windows
Created February 8, 2013 23:46
Media Wiki git-review patch for windows
index 0275f47..335f304 100644
--- "a/C:\\Python26\\Scripts\\git-review"
+++ "b/C:\\Python26\\Scripts\\git-review"
@@ -134,7 +134,10 @@ def set_hooks_commit_msg(remote, target_file):
scp_cmd += hostname
else:
scp_cmd += "%s@%s" % (username, hostname)
- scp_cmd += ":hooks/commit-msg %s" % target_file
+ # msysgit hacks to work around scp.exe (--aaron)
+ rel_target_path = str.replace( ".\%s" % os.path.relpath( target_file ), "\\", "/" )
@patux
patux / process_local.rb
Created November 23, 2012 19:11
vagrant-hostmaster process_local
if process_local?(options)
env.ui.info("Adding host entry for #{name} VM. Administrator privileges will be required...") unless options[:quiet]
sudo add_command
end
def process_local?(options = {})
{:local => true}.merge(options)[:local]
end
@patux
patux / process_local
Created November 23, 2012 19:11
vagrant-hostmaster process_local
if process_local?(options)
env.ui.info("Adding host entry for #{name} VM. Administrator privileges will be required...") unless options[:quiet]
sudo add_command
end
def process_local?(options = {})
{:local => true}.merge(options)[:local]
end
@patux
patux / devstack.rb
Created August 21, 2012 00:07 — forked from vishvananda/devstack.rb
Vagrant script for devstack
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
sshdir = "#{ENV['HOME']}/.ssh/"
cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/cache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.2.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027027")
suffix = "100"