Skip to content

Instantly share code, notes, and snippets.

View ojacquemart's full-sized avatar

Olivier Jacquemart ojacquemart

View GitHub Profile
@ojacquemart
ojacquemart / gist:7126635
Created October 23, 2013 20:57
curl basic auth
curl -i -H "Authorization: base64token" http://localhost:9000/api/foo
@ojacquemart
ojacquemart / gist:9280350
Created February 28, 2014 21:31
BodyBindKeydown
.directive('bindKeydown', function () {
return {
restrict: 'A',
link: function (scope, element) {
element.bind('keydown', function (e) {
if (e.target === element[0]) {
scope.$broadcast('body:keydown', e.keyCode);
}
});
}
@ojacquemart
ojacquemart / gist:b409b5bb6aaa0dad71c2
Created August 3, 2014 07:22
ionic cordova datepicker
$scope.showDate = function() {
event.stopPropagation();
if (window.plugins && window.plugins.datePicker) {
window.plugins.datePicker.show({
date : $scope.date,
mode : 'time'
}, function(date) {
$scope.$apply(function() {
// Store date
@ojacquemart
ojacquemart / RxFirebase.java
Created May 30, 2016 22:48 — forked from gsoltis/RxFirebase.java
RxJava Bindings for Firebase
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 {