This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PACKAGE NAME | |
PACKAGE = com.companyname.appname | |
# DATABASE NAME | |
DB = db_app.db | |
# COPY ON ADB == cat | |
# If permission denied, change /sdcard to /storage/sdcard(#) | |
adb shell "run-as $PACKAGE cat /data/data/$PACKAGE/databases/$DB > /sdcard/$DB" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[1;32m\]❎ DATE:\[\033[1;37m\] \d \[\033[1;32m\] ❎ USER:\[\033[1;37m\] \u \[\033[32m\] ❎ DIRECTORY:\[\033[1;37m\] \w \[\033[1;32m\] ❎ BRANCH:\[\033[1;37m\]\$(parse_git_branch)\[\033[00m\] \n\[\033[1;32m\]└ ▶ \[\033[37m\]" | |
GIT COLOR | |
#[alias] | |
# lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootScope.$watch(function(){ | |
// Return ratio | |
return $ionicSideMenuDelegate.getOpenRatio(); | |
},function (ratio){ | |
// Broadcast the value | |
$rootScope.sidemenuopened = (ratio == 1); | |
}); | |
// <div ng-class="{'opaque-content' : sidemenuopened}"> | |
// Attach to side menu content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize Locations for Question A Mall - Foodcourt | |
// $rootScope.qa_regions = Location.region(); | |
// $rootScope.qa_provinces = []; | |
// $rootScope.qa_city = []; | |
// $rootScope.qa_brgy = []; | |
// Initialize Locations for Question B Mall - Foodcourt | |
// $rootScope.qb_regions = Location.region(); | |
// $rootScope.qb_provinces = []; | |
// $rootScope.qb_city = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var bower = require('bower'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var minifyCss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var sh = require('shelljs'); | |
var paths = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: Install Globally electron packager | |
npm install electron-packager -g | |
# Mac Os | |
electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds | |
# Windows Os | |
electron-packager . --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Electron Tutorial App\" | |
# Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Initialize options */ | |
var options = { | |
quality: 50, | |
destinationType: Camera.DestinationType.DATA_URL, | |
sourceType: Camera.PictureSourceType.PHOTOLIBRARY, | |
allowEdit: true, | |
encodingType: Camera.EncodingType.JPEG, | |
targetWidth: 800, | |
targetHeight: 800, | |
popoverOptions: CameraPopoverOptions, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<video id="video" width="640" height="480" autoplay></video> | |
<button id="snap">Snap Photo</button> | |
<canvas id="canvas" width="640" height="480"></canvas> | |
<script> | |
/* { audio: true } */ | |
/* Get camera access */ | |
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { | |
navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Flashing the recovery image: | |
fastboot flash recovery recovery.img | |
2. Flash the kernel and bootloader: | |
fastboot flash boot boot.img | |
3. Erase a partition: | |
fastboot erase cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*================================================== | |
= Bootstrap 3 Media Queries = | |
==================================================*/ | |
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} |