Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Sawicki kevinsawicki

View GitHub Profile
View adafruit.md

token = aio_XoSD69IcBnZXuIaRrpgQPgx5yBWw

@kevinsawicki
kevinsawicki / index.html
Last active Jan 22, 2021
Electron Vibrancy Example
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vibrancy Example</title>
<style>
* {
color: rgba(100, 100, 100, 0.9);
}
h1 {
@kevinsawicki
kevinsawicki / transcript.coffee
Created May 28, 2014
Convert Campfire Transcript
View transcript.coffee
#!/usr/bin/env coffee
fs = require 'fs'
log = fs.readFileSync('log.txt', 'utf8')
lines = log.split('\n')
lines = lines.filter (line) -> not /\thas entered the room$/.test(line)
lines = lines.filter (line) -> not /\thas left the room$/.test(line)
@kevinsawicki
kevinsawicki / instructions.md
Last active Aug 29, 2015
Style hyperlinks in Atom
View instructions.md
  • Open Atom
  • Click the Atom > Open Your Stylesheet menu item
  • Paste code below
.editor .markup.underline.link.hyperlink {
  color: #F9EE98;
  text-decoration: underline;
}
View toners-pub.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevinsawicki
kevinsawicki / stork.sh
Created Dec 28, 2011
Prints weekly stock prices for a specific year
View stork.sh
#!/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 / EclipseMirrors.java
Created Sep 15, 2011
Print out Eclipse Git repositories that are not mirrored on GitHub
View EclipseMirrors.java
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 / Fork.java
Created Aug 26, 2011
Forks a repository using API v3
View Fork.java
import java.io.IOException;
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.RepositoryService;
public class Fork {
public static void main(String... args) throws IOException {
GitHubClient client = new GitHubClient();