This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.hadoop.fs.Path | |
import org.apache.hadoop.hbase.io.hfile.{HFile,HFileScanner} | |
import org.apache.hadoop.hbase.io.hfile.HFile.Reader | |
import org.apache.hadoop.hbase.io.ImmutableBytesWritable | |
import org.apache.hadoop.hbase.KeyValue | |
import org.apache.hadoop.mapreduce.{JobContext,InputSplit,TaskAttemptContext,RecordReader} | |
import org.apache.hadoop.mapreduce.lib.input.{FileInputFormat,FileSplit} | |
class HFileInputFormat extends FileInputFormat[ImmutableBytesWritable, KeyValue] { | |
override def isSplitable(context: JobContext, file: Path): Boolean = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns pom2proj | |
(:require [clojure.xml :as xml] | |
[clojure.zip :as zip] | |
[clojure.java.io :as io] | |
[clojure.data.zip.xml :as zx]) | |
(:use [clojure.pprint :only [pprint]])) | |
(defn- text-attrs | |
[loc ks] | |
(map (fn [k] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 16. June 2013 | |
#################################### | |
# This is apparantly needed for python when running manage.py | |
# described here: http://stackoverflow.com/questions/11593556/django-createsuperuser-not-working | |
export LANG=en_US.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (grunt) -> | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks) | |
grunt.initConfig { | |
app: | |
dev: "app" | |
watch: | |
sass: | |
files: ['<%= app.dev %>/**/*.scss'] | |
tasks: ['compass:dist'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro defprotocol+ [name & funcs] | |
(let [vararg-sym (symbol "&") | |
normalized-func-specs (map #(let [[n a] %] | |
(if (.contains a vararg-sym) | |
[(symbol (str n "*")) | |
(vec (remove (fn [_a] | |
(= _a vararg-sym)) a)) | |
[n a]] | |
[n a])) | |
funcs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const functions = require('firebase-functions') | |
const admin = require('firebase-admin') | |
// This is hosted using Firebase Functions to gain easier access without meddling with service key | |
admin.initializeApp(functions.config().firebase) | |
exports.verifyToken = functions.https.onRequest((req, res) => { | |
const { idToken } = req.query | |
if (!idToken) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ProjectId = string; // eg: 2a13b3e1-7a74-3b2b-9758-1b398845a8e8 | |
type UserId = number; | |
type ShareId = string; | |
type ClientId = string; | |
// login | |
// response sessionid returned in set-cookie | |
// curl -X POST https://workflowy.com/accounts/login/ -F 'username=<username>' -F'password=<password>' -H 'accept: application/json' -D - | |
export interface LoginFormData { | |
username: string; |