Skip to content

Instantly share code, notes, and snippets.

View welcoMattic's full-sized avatar

Mathieu Santostefano welcoMattic

View GitHub Profile
@welcoMattic
welcoMattic / IonicCordovaNetwork.js
Last active December 4, 2021 04:33
Async navigator.connection.type service for Ionic Framework
var myApp = angular.module('myApp').service('CordovaNetwork', ['$ionicPlatform', '$q', function($ionicPlatform, $q) {
// Get Cordova's global Connection object or emulate a smilar one
var Connection = window.Connection || {
"CELL" : "cellular",
"CELL_2G" : "2g",
"CELL_3G" : "3g",
"CELL_4G" : "4g",
"ETHERNET" : "ethernet",
"NONE" : "none",
"UNKNOWN" : "unknown",
@welcoMattic
welcoMattic / .bash_profile
Created April 6, 2014 19:13
.bash_profile
alias apchr="sudo apachectl restart"
alias php53="brew-php-select --set php53 && php-version 5.3"
alias php55="brew-php-select --set php55 && php-version 5.5"
@welcoMattic
welcoMattic / gist:8541820
Created January 21, 2014 15:10
orientdb-binary NodeJS error
[...]/node_modules/orientdb-binary/lib/orientdb/db.js:85
this.serverProtocolVersion = OperationTypes.SERVER_PROTOCOL_VERSION;
^
TypeError: Cannot set property 'serverProtocolVersion' of undefined