Skip to content

Instantly share code, notes, and snippets.

View caniszczyk's full-sized avatar
💭
always paying it forward

Chris Aniszczyk caniszczyk

💭
always paying it forward
View GitHub Profile
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@caniszczyk
caniszczyk / stats.coffee
Created April 26, 2012 02:22
stats.coffee
stats =
time: (metric, f) ->
f()
get_time_ms: (metric) ->
0
@caniszczyk
caniszczyk / git-pre-receive-hook.sh
Created October 31, 2011 13:17
A reasonable git pre-receive-hook
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.
@caniszczyk
caniszczyk / CheckoutCommand.java
Created June 14, 2011 22:26
CheckoutCommand.java
* Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com>
* Copyright (C) 2011, Matthias Sohn <matthias.sohn@sap.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Distribution License v1.0 which
* accompanies this distribution, is reproduced below, and is
* available at http://www.eclipse.org/org/documents/edl-v10.php
*
* All rights reserved.
@caniszczyk
caniszczyk / DeepLinkBundleList.java
Created April 19, 2011 22:24
DeepLinkBundleList.java
* Copyright (c) David Orme and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* David Orme - initial API and implementation
******************************************************************************/
package org.eclipse.e4.core.deeplink;
package abc.editors;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
@caniszczyk
caniszczyk / TagContainsTest.java
Created February 22, 2011 23:55
Tries to use JGit to perform git tag --contains
/*
* Copyright (C) 2011, Chris Aniszczyk <caniszczyk@gmail.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Distribution License v1.0 which
* accompanies this distribution, is reproduced below, and is
* available at http://www.eclipse.org/org/documents/edl-v10.php
*
* All rights reserved.
@caniszczyk
caniszczyk / eclipse-egit.spec
Created January 26, 2011 20:44
A hcaked up eclipse-egit.spec file to play with the p2 director
%global eclipse_base %{_libdir}/eclipse
%global install_loc %{_datadir}/eclipse/
Summary: Eclipse Git plug-in
Name: eclipse-egit
Version: 0.11.1
Release: 1%{?dist}
License: EPL
URL: http://www.eclipse.org/egit/
Group: Development/Tools
@caniszczyk
caniszczyk / p2director.sh
Created January 25, 2011 15:40
A convenience script to launch the org.eclipse.equinox.p2.director application
#!/bin/bash
if [ $# -lt "5" ]
then
echo
echo "This script needs 5 arguments!"
echo " 1) installable unit (IU)";
echo " 2) metadata repository";
echo " 3) artifact repository";
echo " 4) eclipse directory (destination)";
echo " 5) bundle pool directory";