Skip to content

Instantly share code, notes, and snippets.

View abellion's full-sized avatar
💭
Building something new

Antoine Bellion abellion

💭
Building something new
View GitHub Profile
This file has been truncated, but you can view the full file.
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
FROM ubuntu:14.04
MAINTAINER Antoine Bellion <-----@msn.com>
# Update system and install libs
RUN apt-get update \
&& apt-get install -y nodejs npm nodejs-legacy git
# Install http-server and bower
RUN npm install -g http-server bower
@abellion
abellion / example.service.js
Created April 28, 2016 12:58
PouchDB base class
(function() {
angular
.module('app')
.factory('my_visits', my_visits);
my_visits.$inject = ['$rootScope', '$q', 'my_pouchdb'];
function my_visits( $rootScope, $q, my_pouchdb) {
var self = angular.extend(this, my_pouchdb);
self.db = new PouchDB('public');
@abellion
abellion / app.load.js
Last active April 13, 2016 12:01
Pour rony
(function() {
angular.module('app', ['ionic', 'ngCordova', 'angularMoment', 'ng.group']);
loadData.$inject = ['$q', '$cordovaSplashscreen', 'my_criterions', 'my_visits', 'my_share', 'my_user'];
function loadData( $q, $cordovaSplashscreen, my_criterions, my_visits, my_share, my_user) {
var promises = [
my_visits.createViews(),
my_visits.buildViewsIndexes(),
@abellion
abellion / extend.js
Last active November 18, 2015 10:49
Extend Object or Array own prototype.
function extendOwnPrototype(obj, prototype) {
var oldPrototype = Object.getPrototypeOf(obj);
var newPrototype = Object.create(oldPrototype);
var newObject = Object.create(newPrototype);
var length = Object.getOwnPropertyDescriptor(obj, 'length');
for (var key in prototype) {
Object.defineProperty(newPrototype, key, { 'value': prototype[key] });
}
for (var key in obj) {
@abellion
abellion / img.directive.js
Last active October 27, 2015 21:26
AngularJs service for caching images
(function(){
angular
.module('app')
.directive('img', img);
img.$inject = [];
function img() {
return ({
restrict: 'E',