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 / README.md
Created March 28, 2017 00:08 — forked from erichrobinson/README.md
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
@tomysmile
tomysmile / sample.js
Created February 9, 2017 02:58 — forked from chrisabrams/sample.js
Bluebird promise chain example
Promise = require('bluebird')
var A = function() {
return new Promise(function(resolve, reject) {
var result = 'A is done'
console.log(result)
resolve(result);
})
@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 / brew-macosx.md
Last active January 13, 2017 06:21
Brew Install on Mac Osx
@tomysmile
tomysmile / ionic2-install-lodash.md
Created December 9, 2016 05:26
ionic 2 - install lodash

Installation

To add an additional library to your app, you can run:

npm install <theLibraryName> --save

For example, to install Lodash:

@tomysmile
tomysmile / gammu - smsdrc.md
Last active October 28, 2016 10:32
Gammu - MySQL DB Structure for MySQL 5.7

Gammu - SMSDRC Sample configuration

# Configuration file for Gammu SMS Daemon

# Gammu library configuration, see gammurc(5)
[gammu]
port = /dev/ttyUSB0
connection = at115200
# Debugging
@tomysmile
tomysmile / node-setup-pm2-nginx.md
Last active March 6, 2021 18:19
Setup NodeJS Production with PM2, Nginx in Ubuntu 16.04

How To Set Up a Node.js Application for Production on Ubuntu 16.04

with PM2 & Nginx

Create User

as a root, run below commands on server:

# adduser tomy

$ npm install --unsafe-perm -g strong-pm $ sudo sl-pm-install --systemd --set-env NODE_ENV=production $ sudo /usr/bin/systemctl start strong-pm

$ sudo /usr/bin/systemctl daemon-reload $ sudo /usr/bin/systemctl restart strong-pm

NOTE: On RHEL, by default /usr/local/bin is not on the path, so if you encounter problems, use this install command: sudo env "PATH=$PATH" sl-pm-install

@tomysmile
tomysmile / mac-setup-redis.md
Last active March 18, 2024 22:12
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@tomysmile
tomysmile / mac-php-composer-setup.md
Created July 11, 2016 10:45
Setup PHP Composer using Brew