Skip to content

Instantly share code, notes, and snippets.

View michaeljymsgutierrez's full-sized avatar
:octocat:
I'm just a developer for fun ⌨️

Chael Gutierrez michaeljymsgutierrez

:octocat:
I'm just a developer for fun ⌨️
View GitHub Profile
db = window.openDatabase("dbname.db", "1.0", "Cordova Demo", 200000);
@michaeljymsgutierrez
michaeljymsgutierrez / custom-directive.js
Created March 20, 2017 04:55
Update ng-model using custom-directive
.directive('noNegativeValue',function(){
//Custom Directive for checking negative value
return {
restrict: 'A',
require: '?ngModel',
link: function(scope, element , attrs, ngModel){
scope.$watch(attrs.ngModel, function(val){
if(val < 0){
ngModel.$setViewValue('0');
@michaeljymsgutierrez
michaeljymsgutierrez / GIT.md
Last active March 25, 2017 02:57
GIT Commands
  • git status
    • checked if files are modified
    • checked if there are untracked files
    • Example: git status
  • git add filename_and_extenstion
    • add files to commit to push in repo
    • include directory if necessary
    • Example:
      • after git status you see "modified: profiles/bms/modules/bms/angularjs_bms/js/controllers.js"
  • git add profiles/bms/modules/bms/angularjs_bms/js/controllers.js
@michaeljymsgutierrez
michaeljymsgutierrez / buttons.print.js
Last active July 9, 2018 07:19
buttons.print.js Configurable Library Datatables.net
/*!
* Print button for Buttons and DataTables.
* 2015 SpryMedia Ltd - datatables.net/license
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
// AMD
define(["jquery", "datatables.net", "datatables.net-buttons"], function($) {
return factory($, window, document);
@michaeljymsgutierrez
michaeljymsgutierrez / DEV-ENV-Installation.txt
Last active July 17, 2017 03:49
IONIC-DEV_ENV_INSTALLATION
# JAVA HOME
export JAVA_HOME=/home/vielsoft-dev-6/jdk1.8.0_91/
export PATH=$JAVA_HOME/bin:$PATH
# ANDROID HOME
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
source ~/.bashrc
/*!
* HTML5 export buttons for Buttons and DataTables.
* 2015 SpryMedia Ltd - datatables.net/license
*
* FileSaver.js (2015-05-07.2) - MIT license
* Copyright © 2015 Eli Grey - http://eligrey.com
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
@michaeljymsgutierrez
michaeljymsgutierrez / Sublime Text 3 Build 3103 License Key - CRACK
Created April 26, 2017 05:15
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@michaeljymsgutierrez
michaeljymsgutierrez / vhost.conf
Last active January 7, 2020 10:22
VHost Configuration Example
<VirtualHost *:80>
ServerName site.local
DocumentRoot /var/www/html/project/app
Header set Access-Control-Allow-Origin "*"
<Directory /var/www/html/project/app/>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
@michaeljymsgutierrez
michaeljymsgutierrez / command.txt
Created June 13, 2017 00:24
mac-terminal-code-recovery
sudo nvram "recovery-boot-mode=unused"
sudo reboot recovery