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 / 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 / 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.
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 / 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;
@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 / stats.coffee
Created April 26, 2012 02:22
stats.coffee
stats =
time: (metric, f) ->
f()
get_time_ms: (metric) ->
0
@caniszczyk
caniszczyk / gist:3863336
Created October 10, 2012 05:30
GitHub Pull Requests via CLI
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
@caniszczyk
caniszczyk / gist:4150193
Created November 26, 2012 19:45
count "fuck" or "oops" in github commit messages
SELECT repository_name, repository_language, repository_description, repository_watchers, payload_commit_msg, url, PARSE_UTC_USEC(created_at) as timestamp
FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND (
LOWER(payload_commit_msg) CONTAINS "fuck" OR
LOWER(payload_commit_msg) CONTAINS "oops"
)
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2011-02-01 00:00:00')
ORDER BY timestamp DESC
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype-nexus-staging</id>
<username>caniszczyk</username>
<password>password</password>
@caniszczyk
caniszczyk / github_profanity.sql
Created December 28, 2012 20:41
A query against the GitHub Archive for "seven dirty word" usage in 2012
SELECT repository_name, repository_language, repository_description, repository_watchers, payload_commit_msg, url, PARSE_UTC_USEC(created_at) as timestamp
FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND (
LOWER(payload_commit_msg) CONTAINS "shit" OR
LOWER(payload_commit_msg) CONTAINS "piss" OR
LOWER(payload_commit_msg) CONTAINS "fuck" OR
LOWER(payload_commit_msg) CONTAINS "cunt" OR
LOWER(payload_commit_msg) CONTAINS "cocksucker" OR
LOWER(payload_commit_msg) CONTAINS "motherfucker" OR