Skip to content

Instantly share code, notes, and snippets.

View bora89's full-sized avatar
💭
🧑‍💻 Have you digitised your business❓Tell me if you haven't!

Alex bora89

💭
🧑‍💻 Have you digitised your business❓Tell me if you haven't!
  • Digimation
  • Dubai, United Arab Emirates
View GitHub Profile
@bora89
bora89 / module-service-directive-boilerplate.js
Last active January 11, 2017 07:04
Angular 1.x Module, service, directive boilerplate
(function () {
'use strict';
angular
.module('xtras')
.factory('modalPopupService', service);
service.$inject = [''];
@bora89
bora89 / angularjs.resource-custom-put.js
Created December 9, 2016 09:26
AngularJS $resource usage (custom PUT) non-GET "class" actions: Resource.action([parameters], postData, [success], [error])
var res = $resource(ENV.API_URL+'/playlist/:id', null, {
'update': { method: 'PUT', params: {id: '@id'} }
});
// usage
res.update({ id: id }, {name: name });
// name will be in the Payload, id - in the URI
@bora89
bora89 / git-blane-line.sh
Created December 4, 2016 14:32
git blame by line from 1080 + 50 lines
git blame -L1080,+50 -- app/system/controllers/main.js
@bora89
bora89 / set-env-for-cordova.sh
Created November 30, 2016 12:41
set required env variables for cordova
# add in your .bash_profile
export ANDROID_HOME=/Users/alexander/Library/Android/sdk/
export JAVA_HOME=$(/usr/libexec/java_home)
@bora89
bora89 / list-all-devices.sh
Created November 30, 2016 12:39
list all available devices to run on
cordova run --list
@bora89
bora89 / android-sdk-avd.sh
Created November 30, 2016 10:23
androind vitrual device android sdk
#add to .bash_profile
export PATH=${PATH}:/Users/{username}/Library/Android/sdk/platform-tools:/Users/{username}/Library/Android/sdk/tools/:/Users/alexander/Library/Android/sdk/build-tools/25.0.0/
# invoke android sdk manager
android sdk
# invoke android virtual device manager
android avd
@bora89
bora89 / run-device-emulator.sh
Last active November 30, 2016 10:47
run device emulator
ionic emulate android --target="nexus5_5.1.1"
@bora89
bora89 / new_gist_file_0
Created November 28, 2016 08:19
df: cannot read table of mounted file systems df -l
grep -v rootfs /proc/mounts > /etc/mtab