Skip to content

Instantly share code, notes, and snippets.

@dylanPowers
dylanPowers / rc.lua
Created September 13, 2015 21:40
Awesome config
--[[
Heavily modified version of
Powerarrow Darker Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
local gears = require("gears")
local awful = require("awful")
@dylanPowers
dylanPowers / broadcasted_stdin.dart
Last active August 29, 2015 14:10
Running a process interactively in Dart
library broadcasted_stdin;
import 'dart:async';
import 'dart:io' as io;
class InteractiveProcess {
Future<int> get whenExits => _whenExits;
final BroadcastedStdin _stdin;
Future<int> _whenExits;
import 'dart:async';
import 'package:polymer/polymer.dart';
@CustomTag('simple-polymer')
class SimplePolymer extends PolymerElement {
SimplePolymer.created() : super.created();
@override
@dylanPowers
dylanPowers / .gitconfig
Last active January 1, 2016 02:28
Git merging on 'roids
# .gitconfig snippet
[merge]
tool = superMerge
conflictstyle = diff3
[mergetool "superMerge"]
cmd = \"C:/Program Files (x86)/Git/bin/superMerge\" $BASE $LOCAL $REMOTE $MERGED
@dylanPowers
dylanPowers / deploy.sh
Last active December 31, 2015 09:49
Dart deploy to github user page script. This uses pub build for the compilation to js. It also depends on pub being in your path. For a rough overview, it runs a pub build, then pushes the contents from the normally ignored build directory to the master branch on github.
#!/bin/sh
echo "\nBacking up the source with a git push"
git push
if [ $? -ne 0 ]; then
echo "\n\ngit push failed"
exit 1
fi
@dylanPowers
dylanPowers / build.gradle
Created October 10, 2013 07:25
A sample build.gradle script that incorporates the Android NDK. This differs from a lot of samples out there because it makes use of the new default directory setup.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
@dylanPowers
dylanPowers / config
Created June 6, 2012 20:20
Pianobar config
user = xxxxx@email.com
password = xxxxxxxx
partner_password = TVCKIBGS9AO9TSYLNNFUML0743LH82D
partner_user = pandora one
device = D01
decrypt_password = U#IO$RZPAB%VX2
encrypt_password = 2%3WCL*JU$MP]4
@dylanPowers
dylanPowers / JSONHelper.java
Created June 1, 2012 23:30
A helper class for the org.json Java package to convert to generic Maps and Vectors
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Vector;
import org.json.JSONArray;
import org.json.JSONObject;
/*
* Description: An abstract class for a logical organization of the following
* two functions.