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 / Raspberry and Gammu.md
Last active May 18, 2022 01:02 — forked from damonsk/gist:3955099
GAMMU: Send SMS with Raspberry Pi

Send SMS messages using Raspberry Pi.

Using gammu and Huawei E220

Prepare SD card with wheezy.

Login / complete rasp-config / reboot / login

Set vimrc to prevent annoying ADBC arrow keys

cp /etc/vim/vimrc ~/.vimrc

@tomysmile
tomysmile / docker-compose.yml
Created December 17, 2018 10:31 — forked from Miamoto-Musashi/docker-compose.yml
konga docker-compose
version: '2'
volumes:
mongo_data:
cassandra_data:
services:
kong:
image: kong:latest
depends_on:
@tomysmile
tomysmile / Docker shell commands.sh
Created January 20, 2019 07:58 — forked from bahmutov/Docker shell commands.sh
A personal cheat sheet for running local Node project in a Docker container
# See list of docker virtual machines on the local box
$ docker-machine ls
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
# Note the host URL 192.168.99.100 - it will be used later!
# Build an image from current folder under given image name
$ docker build -t gleb/demo-app .
@tomysmile
tomysmile / client.js
Created January 22, 2018 14:37 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@tomysmile
tomysmile / installing_cassandra.md
Created December 17, 2018 09:12 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@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 / mac-apps.md
Created February 26, 2018 14:09 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@tomysmile
tomysmile / random.js
Created January 22, 2018 17:28 — forked from kerimdzhanov/random.js
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@tomysmile
tomysmile / BackgroundGeolocation-Ionic2.js
Created December 29, 2017 07:34 — forked from christocracy/BackgroundGeolocation-Ionic2.js
Simple Cordova Background Geolocation Implementation for Ionic 2
/**
* How to implement cordova-background-geolocation with Ionic 2
* https://github.com/transistorsoft/cordova-background-geolocation-lt
* Chris Scott, Transistor Software <chris@transistorsoft.com>
*/
import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';
@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.