Skip to content

Instantly share code, notes, and snippets.

View PterPmnta's full-sized avatar
💭
FullStack Web Developer

Pedro Pimienta M. PterPmnta

💭
FullStack Web Developer
View GitHub Profile
@jdnichollsc
jdnichollsc / app.js
Last active April 14, 2019 03:23
SQLite plugin with ngCordova in Ionic Framework => Using service pattern (Works for litehelpers/Cordova-sqlite-storage and MSOpenTech/cordova-plugin-websql) Code => http://1drv.ms/1Ono0Ys Template => https://github.com/jdnichollsc/Ionic-Starter-Template
angular.module('Demo', ['ionic', 'Demo.controllers', 'Demo.services', 'ngCordova'])
.run(function ($ionicPlatform, sqliteService) {
$ionicPlatform.ready(function () {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
@jdnichollsc
jdnichollsc / Codes
Last active June 22, 2023 19:04
Ionic Framework Links
- Ejemplo de Gulp con Ionic => https://gist.github.com/jdnichollsc/e3a323223fcb7822dbba
- SQLite con ngCordova usando patrón de servicio y promesas => https://gist.github.com/jdnichollsc/9ac79aaa3407e92677ba
- Permitir dinamicamente arrastrar elementos de una Lista => https://gist.github.com/mhartington/c5107ccd9204b755442b
- Obtener datos consumiendo un servicio REST o desde el LocalStorage => https://gist.github.com/jdnichollsc/7367fe5b17369e856157
- Cambiar el tamaño de un Modal => https://gist.github.com/jdnichollsc/1b0112dfdca4b7f06fbe
- OAuth Authentication, Firebase 3 and ngCordovaOauth => https://gist.github.com/jdnichollsc/17bae6581d405321937fe433410172c9
- Firebase Upload Files => https://gist.github.com/jdnichollsc/5ddc40c1c482e6209a8f4d634fd11d1e
- Download and Open Files => https://gist.github.com/jdnichollsc/1e
@Evanion
Evanion / .bowerrc
Last active April 18, 2017 16:14
Revised Ionic build environment
{
"directory": "vendor"
}
@mircobabini
mircobabini / Angular.Ionic.HardwareBackButtonManager.js
Last active November 8, 2018 08:44
HardwareBackButtonManager Service for Ionic (Angular.js) provides an interface to easily enable or disable the hardware back button on Android
.service( 'HardwareBackButtonManager', function($ionicPlatform){
this.deregister = undefined;
this.disable = function(){
this.deregister = $ionicPlatform.registerBackButtonAction(function(e){
e.preventDefault();
return false;
}, 101);
}
@pbernasconi
pbernasconi / sqlite.js
Last active April 7, 2016 22:15
ngCordova SQLite Plugin
angular.module('ngCordova.plugins.sqlite', [])
.factory('$cordovaSQLite', ['$q', function ($q) {
return {
openDB: function(dbName) {
return window.sqlitePlugin.openDatabase({name: dbName});
},
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@joeymink
joeymink / last_tweet.sh
Created April 9, 2014 13:35
Bash script to display a user's last tweet
#!/bin/bash
function usage {
echo "Usage:"
echo "last_tweet.sh <api key> <api secret> <username>"
exit 1
}
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then
usage
@turbod
turbod / location.js
Created March 18, 2014 13:11
Get city name by location
function errorLocation(msg) {
console.log(msg);
}
function successLocation(position) {
var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var result = results[0];
@hectoregm
hectoregm / angularfire-crud-es.md
Last active October 3, 2020 19:05
Tutorial for basic CRUD using AngularJS and Firebase

Tutorial para AngularFire (AngularJS + Firebase)

Introduccion

En este tutorial haremos uso de AnguarJS y de Firebase (esta combinacion es tambien llamada AngularFire) para implementar un CRUD basico para el ingreso de usuarios. En este tutorial se tiene como requisitos tener instalado git y tener una cuenta en Firebase

AngularJS

Es un framework MVC que esta implementado en Javascript este vive en el lado del cliente (navegador) y dado que usaremos como backend a Firebase que nos da un BD desde el cliente es solo necesario un servidor web para poder enviar HTML, CSS y el Javascript de la aplicacion. Haremos uso de un servidor web usando Node.js desde la consola para ver como va nuestra aplicacion.

@wbroek
wbroek / genymotionwithplay.txt
Last active November 7, 2025 10:51
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)