Skip to content

Instantly share code, notes, and snippets.

View abtris's full-sized avatar

Ladislav Prskavec abtris

View GitHub Profile
#!/bin/sh
#Example for unix like systems
# NOTE: Erlang must be already installed
# Download:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v1.7.2/rabbitmq-server-generic-unix-1.7.2.tar.gz
# Untar:
tar -xzvf rabbitmq-server-generic-unix-1.7.2.tar.gz
DROP FUNCTION IF EXISTS `GENERATE_UPDATE_TRIGGERS`;;
CREATE DEFINER=`vlasta`@`%` FUNCTION `GENERATE_UPDATE_TRIGGERS`(`src` varchar(130)) RETURNS text CHARSET utf8
READS SQL DATA
COMMENT 'generuje kód pro vytvoření update triggerů (BI, BU)'
BEGIN
DECLARE src_schema, src_table VARCHAR(64);
DECLARE output TEXT DEFAULT '';
DECLARE col_name, x_schema, x_table VARCHAR(64);
DECLARE nullable VARCHAR(3);
@karmi
karmi / git-hosting-apache.conf
Created July 21, 2010 07:43
Configuration for hosting Git repositories with Apache 2.x
# ----------------------------------------------------------
# Configuration for hosting Git repositories with Apache 2.x
# ----------------------------------------------------------
#
# This setup provides "dual URLS", where URL like <http://git.example.com/my_repository.git>
# loads Gitweb in the browser and the same URL can be used in commands like `git clone` and `git remote add`.
# It was compiled from some sources on the internet and further customized/tuned.
#
# Please see documentation for:
#
@kiy0taka
kiy0taka / commit-irc.groovy
Created September 9, 2010 04:40 — forked from kiy0taka/commit-irc.groovy
Using Groovy to Git post-commit hook: IRC Bot to print commit Message
@Grab('pircbot:pircbot:1.4.2')
import org.jibble.pircbot.*;
def (host, port, channel) = ['<Server>', <Port>, '<Channel>']
def bot = [:] as PircBot
bot.name = 'groovy_bot'
bot.encoding = 'ISO-2022-JP'
bot.connect host, port
bot.joinChannel channel
@starenka
starenka / bzr_precommit_lint.py
Created December 22, 2010 10:26
bzr hooks (py, rb, php syntax check)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# this is a plugin/hook for bazaar. just add this file to ~/.bazaar/plugins/precommit"""
#
# @author: starenka
# @email: starenka0[at]gmail[dot]com
# @version: 1.1
# @since Feb 28, 2010
Vagrant::Config.run do |global_config|
aptdir = (ENV['APTCACHE'] or "#{ENV['HOME']}/aptcache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.76.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027076")
fixed = (ENV['FIXED'] or "10.0.76.0/24")
global_config.vm.define :chef do |config|
suffix = "100"
ip = "#{ip_prefix}#{suffix}"
config.vm.box = "base"
@vitobotta
vitobotta / Importing posts from Wordpress into Jekyll.rb
Created March 26, 2011 22:50
The script I used to import posts from my Wordpress blog into a new Jekyll one.
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g}
require File.join(File.dirname(__FILE__), "downmark_it")
module WordPress
def self.import(database, user, password, table_prefix = "wp", host = 'localhost')
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8')
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder}
@tobiastom
tobiastom / libpng.rb
Created April 4, 2011 08:22
PHP Homebrew Formular
require 'formula'
class Libpng < Formula
url 'http://downloads.sourceforge.net/project/libpng/libpng15/1.5.11/libpng-1.5.11.tar.gz'
homepage 'http://www.libpng.org/pub/png/libpng.html'
md5 '7373f65ca1407ce9910d634e527e8959'
keg_only :provided_by_osx,
"TODO: Which software depends on this newer version of libpng?"
@pepe
pepe / dr-ape.rb
Created April 29, 2011 08:58
Dr.Ape issues
require "rubygems"
require "sinatra"
require "net/http"
require "net/https"
require "uri"
get "/:status?" do
erb :index
end