Skip to content

Instantly share code, notes, and snippets.

@miebach
miebach / README
Created September 3, 2012 10:12
Allow colours and other inline styles in Redmine
Allow colours and other inline styles in Redmine
================================================
Textile inline styles are disabled in Redmine >=0.8 for security reasons.
If you want this feature and don't fear XSS attacks as you don't have projects with public write access, you can change this in /lib/redmine/wiki_formatting/textile/formatter.rb :
self.filter_styles=false
Restart Redmine after the change!
@miebach
miebach / example output
Created August 8, 2012 08:49
Websocket echo test
WebSocket Test
CONNECTED
SENT: WebSocket rocks
RESPONSE: WebSocket rocks
DISCONNECTED
@miebach
miebach / howto.txt
Created August 7, 2012 22:47
Install the latest monit on ubuntu
sudo aptitude install monit
sudo aptitude remove monit
Now we have the basic config and the init script.
Download the latest monit source and untar.
./configure
Install missing dependencies at this point.
@miebach
miebach / git-vlog
Created July 29, 2012 08:48 — forked from asabaylus/git-vlog
Git visual log for the console
http://www.baylus.com/a-nice-visual-log-for-git-command-line/
A nice visual log for Git command line
I like having a quick visual log for Gits command line. Here’s a little git alias which’ll display a brief and colorful summary for your projects.
Enter the following code in terminal or git bash.
You can now generate a visual tree style log, open your shell
@miebach
miebach / gist:3075297
Created July 9, 2012 09:17
Start google chrome in headless mode
http://stackoverflow.com/questions/9210765/any-way-to-start-google-chrome-in-headless-mode
http://e-method.blogspot.co.uk/2010/11/google-chrome-with-xvfb-headless-server.html
Install xvfb:
sudo aptitude install xvfb
Normal start:
@miebach
miebach / iptables
Created July 8, 2012 18:58
/etc/init.d/iptables
#!/bin/bash
# see http://serverfault.com/a/363745/45819
start() {
echo "Starting iptables."
EXT="eth0"
TUNNELS="tun+"
iptables -F
@miebach
miebach / host_up_ping_nt.rb
Created July 7, 2012 21:17
Ruby function to detect if a host is up by pinging it
def host_up_ping_nt?(host)
# Checks if a host is up by pinging it.
# Version for windows. See "man ping" for other systems.
# inspired by http://stackoverflow.com/a/3561831/362951
ping_max_try = 10
cmd = "ping -n 1 #{host}"
#puts cmd
isup = false
ping_max_try.times do
result = `#{cmd}`
@miebach
miebach / Watir on windows
Created July 7, 2012 18:50
Watir on windows
Watir installation on windows
(following more or less https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md )
1) go to http://rubyinstaller.org/downloads and downloaad latest RubyInstaller and the "development kit"
2) Execute RubyInstaller, installing to c:\Ruby - add to path -> yes
3) Unpack devcelopment kit to c:\Ruby\devkit
@miebach
miebach / _git.cmd
Created June 28, 2012 16:20
Start a git bash shell in the local directory
@echo off
cd /d %~dp0
call c:\bip\git\git-bash.bat
@miebach
miebach / Install nodejs as service
Created May 31, 2012 16:04
Install nodejs as a service on windows
1) Download nssm from http://nssm.cc/download/?page=download and extract nssm.exe, for example to %windir%\system32\
2) Install your service:
nssm.exe install my-node-service c:\programs\nodejes\node.exe c:\my\server.js
3) Start it using net start:
net start my-node-service