Skip to content

Instantly share code, notes, and snippets.

@jawspeak
jawspeak / EnvTest.java
Created April 19, 2010 22:22
print out env variables in IDEA on mac
package com.jawspeak;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
#!/usr/bin/env ruby
# http://projecteuler.net/index.php?section=problems&id=1
# 2010-01-26
def sums(n)
s, i, p = 0, 0, 0
while (p < 1000) do
p = n*i
i += 1
s += p
// ==UserScript==
// @name escape_to_close_window
// @namespace Users
// @include http://www.quickmandarin.com/chinesepinyintable/
// ==/UserScript==
// Any key you press will close the modal for pronounciation
function closeModal() {
unsafeWindow.hideShutter()
#!/bin/bash
set -e
env=$1
user=somebody
case $env in
# with help from http://serverfault.com/questions/70482/how-can-i-remotely-log-on-to-a-machine-execute-a-script-which-sets-up-an-environ
machine01)
dir=/opt/tomcat/servers/env-a-1/webapps/foo/
#!/usr/bin/env ruby
require 'fileutils'
require 'find'
# FOR THE RECORD: I strongly dislike branch based development
# FOR THE RECORD: I strongly dislike branch based development
# FOR THE RECORD: I strongly dislike branch based development
# FOR THE RECORD: I prefer trunk based development, and branch by abstraction
#!/bin/bash
# Modified by: jwolter/paul: this is based on teh file located at http://www.yolinux.com/TUTORIALS/src/svndiffwrapper.txt
# modified to only work with beyond compare
# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts
# remain in the result. Any other errorcode will be treated as fatal.
# Author: Michael Bradley
#NOTE: all output must be redirected to stderr with "1>&2" as all stdout output is written to the output file
#!/usr/bin/env ruby
require 'pp'
require 'set'
require 'test/unit'
$heights = %w(T S)
$colors = %w(D F)
$looks = %w(H U)
$people = %w(Adam Bond Cruz Dumbo)
@jawspeak
jawspeak / things_app_sqlite_reverse_engineered_schema.md
Last active August 29, 2015 14:26 — forked from RaVbaker/readme.md
Reverse engineering Things SQLite tasks database

To open SQLite Things.app database run this command in Terminal.app:

$ sqlite3 ~/Library/Containers/com.culturedcode.things/Data/Library/Application\ Support/Cultured\ Code/Things/ThingsLibrary.db

In SQLite command-line type this query to get your tasks stats:

sqlite> .mode column
sqlite> .header on
sqlite> select zscheduler, zstatus, ztrashed, count(*) from ZTHING where z_ent = 13 group by  zstatus,ztrashed order by Z_pk desc;

ZSCHEDULER ZSTATUS ZTRASHED count(*)