Skip to content

Instantly share code, notes, and snippets.

package com.firebase.client;
import com.firebase.client.core.Constants;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.subscriptions.Subscriptions;
public class RxFirebase {
public <T> T execute(Function<DSLContext,T> fun) {
T result = null;
Connection connection = null;
DatabaseException userException = null;
try {
connection = dataSource.getConnection();
connection.setAutoCommit(false);
@azell
azell / Gemfile
Last active August 29, 2015 14:12 — forked from mebezac/Gemfile
gem 'foreman'
gem 'puma'
require 'date'
class FirebasePush
PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'
def initialize
@prev_ts = 0
@rand_chars = Array.new(12)
end
#!/bin/bash
function avoid_conflict {
if [ -f "$1" ]; then
git checkout "$2"
git mv "$1" "$3/"
git commit -am 'Move file into subdirectory.'
fi
}