Skip to content

Instantly share code, notes, and snippets.

View lwiechec's full-sized avatar

Lukasz Wiechec lwiechec

  • Den Haag, Nederland
View GitHub Profile
#!/bin/bash
#
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by mike@mikepearce.net
# modified by aconway@[redacted] - handle diffs that introduce new files
#
# Generate an SVN-compatible diff against the tip of the tracking branch
# Get the tracking branch (if we're on a branch)
TRACKING_BRANCH=`git svn info | grep URL | sed -e 's/.*\/branches\///'`
#!/usr/bin/env python
import sys
import os
import string
MERGE = "emacs"
QFLAG = "-Q"
EVAL = "--eval"
EVALFUNC = ["ediff-merge-files-with-ancestor"]
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="group">
<!--Start recursion over group children-->
<xsl:apply-templates select="*[1]" mode="group"/>
</xsl:template>
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
/**
* Class that throttles requests. Ensures that the StartRequest cannot be called
* more than a given amount of time in any given interval.
*
* StartRequest blocks until this requirement is satisfied.
*
* TryStartRequest returns 0 if the request was cleared, or a non-0 number of
* millisecond to sleep before the next attempt.
*
* Simple usage, 10 requests per second:
@gorsuch
gorsuch / gist:1418850
Created December 1, 2011 18:37
clojure uuid
(defn uuid [] (str (java.util.UUID/randomUUID)))
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@wadouk
wadouk / bashrc.sh
Created March 29, 2012 08:26
Maven console in color
PURPLE=$(echo -en "\033[35m")
GREEN=$(echo -en "\033[32m")
RED=$(echo -en "\033[31m")
YELLOW=$(echo -e "\033[33m")
BLUE=$(echo -e "\033[1;34m")
NORMAL=$(echo -e "\033[0m")
mvn2() {
mvn $* | sed \
-e "s/^\(.ERROR. .*\)$/$RED\1$NORMAL/ ; #contain ERROR start 2nd char
@arguile-
arguile- / gist:2510227
Created April 27, 2012 15:36
Basic Curl deploy file to Nexus
#!/bin/sh
SERVER="http://localhost:8081"
URL="$SERVER/nexus/service/local/artifact/maven/content"
REPO="sandbox"
USER="admin:admin123"
group=$1
artifact=$2
@lwiechec
lwiechec / maven-deps.awk
Created August 24, 2012 13:28 — forked from fs111/gist:3097209
nexus commandline search
#!/bin/bash
# command line search script for nexus instances. Needs curl and xmlstarlet
# installed.
NEXUS_URL="http://nexus.example.com/nexus/service/local/lucene/search?q="
# make sure we got exactly one param
if [ ! $# -eq 1 ]
then