Skip to content

Instantly share code, notes, and snippets.

View kevinsawicki's full-sized avatar

Kevin Sawicki kevinsawicki

View GitHub Profile
@kevinsawicki
kevinsawicki / instructions.md
Last active August 29, 2015 13:56
Style hyperlinks in Atom
  • Open Atom
  • Click the Atom > Open Your Stylesheet menu item
  • Paste code below
.editor .markup.underline.link.hyperlink {
  color: #F9EE98;
  text-decoration: underline;
}
@kevinsawicki
kevinsawicki / Main.java
Created April 26, 2011 17:55
Main.java
public class Main {
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return -1;
}
public static void main(String args[]) {
@kevinsawicki
kevinsawicki / SwtUtils.java
Created April 26, 2011 16:50
SWT utility method for disposing of a resource when the disposal of a widget occurs.
/**
* SWT Utilities.
*
* @author Kevin Sawicki (kevin@github.com)
*/
public abstract class SwtUtils {
/**
* Dispose of resource when widget is disposed.
*
@kevinsawicki
kevinsawicki / UploadFile.java
Created August 2, 2011 23:39
Add downloads to a GitHub repository
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import org.eclipse.egit.github.core.Download;
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.DownloadService;
/**
@kevinsawicki
kevinsawicki / MergeButton.java
Created August 19, 2011 21:55
Merge Button using GitHub Java API
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
import org.eclipse.egit.github.core.MergeStatus;
import org.eclipse.egit.github.core.PullRequest;
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.PullRequestService;
@kevinsawicki
kevinsawicki / EclipseMirrors.java
Created September 15, 2011 00:23
Print out Eclipse Git repositories that are not mirrored on GitHub
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.service.RepositoryService;
@kevinsawicki
kevinsawicki / stork.sh
Created December 28, 2011 21:50
Prints weekly stock prices for a specific year
#!/usr/bin/env bash
curl -s "http://www.google.com/finance/historical?q=$1&startdate=jan+1&2c+$2&enddate=dec+31%2c+$2&output=csv&histperiod=weekly" \
| sed -e '1d' \
| tac \
| cut -d, -f5 \
| spark
@kevinsawicki
kevinsawicki / .gitignore
Last active December 4, 2015 22:17
Require issue
node_modules
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.