Skip to content

Instantly share code, notes, and snippets.

View tomysmile's full-sized avatar

Tomy Ismail tomysmile

  • NITOZA
  • Dubai
View GitHub Profile
@tomysmile
tomysmile / 020_add_android_permissions.js
Created January 23, 2017 19:28 — forked from likerRr/020_add_android_permissions.js
Add permissions to AndroidManifest.xml with cordova hook for Ionic 2
/*
This script uses as a cordova hook and provides ability to add android permissions to AndroidManifest.xml on the fly. It also
checks and computes which of provided permissions are already added and didn't rewrite AndroidManifest.xml if no permissions provided.
Executes only for android platform.
Prerequirements:
- node 4.2+
- npm modules: lodash, xml2js
Distributed under the MIT license.
@tomysmile
tomysmile / strong-pm-install.md
Last active September 17, 2018 11:41
Strong-PM install script for new Digital Ocean droplet Ubuntu 14.x w/ node x

install system pre-req

sudo apt-get install build-essential sqlite git

install strong-pm

sudo npm install -g strong-pm --unsafe-perm
@tomysmile
tomysmile / android_instructions.md
Last active May 18, 2017 02:35 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

** UPDATED according to this NativeScript/nativescript-cli#2706 **

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

@tomysmile
tomysmile / java-settings-osx.md
Created April 24, 2016 05:35 — forked from itsvicsoto/java-settings-osx.md
Java Environment Settings OSX

Java Environment Settings OSX

Brew

Install homebrew

Install Java Pre-Reqs

Install java and maven

export ANDROID_HOME=/Users/admin/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
tools:$ANDROID_HOME/tools:$PATH
@tomysmile
tomysmile / Android Home
Created April 24, 2016 05:29 — forked from ericaroy/Android Home
Setting Android Home on Mac
Note for me to remember how to set Android Home on Mac
Open Terminal and type in..
nano ~/.bash_profile
Add the below paths
The path should be where your android installation is located
export ANDROID_HOME=/Users/username/Library/Android/sdk
export export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save file and type in terminal...
source ~/.bash_profile
@tomysmile
tomysmile / 0_reuse_code.js
Created March 12, 2016 07:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tomysmile
tomysmile / mac-osx-homebrew-setup.md
Last active July 12, 2016 06:12 — forked from sr75/osx-homebrew-setup.md
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2

@tomysmile
tomysmile / 01_Laravel 5 Simple ACL manager_Readme.md
Created January 8, 2016 06:40 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@tomysmile
tomysmile / mysql_commands.md
Last active April 27, 2016 07:34 — forked from jasperf/access_from_web.md
MySQL Commands to create users, database, password and grant necessary privileges from the command line

Bash commands

starting the server

$ mysql.server start

stoping the server

$ mysql.server stop