Skip to content

Instantly share code, notes, and snippets.

View tomysmile's full-sized avatar

Tomy Ismail tomysmile

  • Thinkspedia
  • Dubai
  • 20:50 (UTC +07:00)
View GitHub Profile
@tomysmile
tomysmile / rpi-install-nodejs.md
Created November 18, 2015 07:15
Raspberry: Installing NodeJS

Installing node.js on Raspberry PI

Now that you are connected to your Pi via SSH, you can move on to installing the latest stable version of node.js. Thanks to the node-arm project and Adafruit's Raspberry Pi Package Repository, installing the latest version of node.js on a Raspberry Pi is very simple.

Adding the Package Repository

The first step will be to add the apt.adafruit.com package repository to your Pi's /etc/apt/sources.list file. You can do this by running the following command.

curl -sLS https://apt.adafruit.com/add | sudo bash
@tomysmile
tomysmile / gammu-insert-sms.md
Created November 18, 2015 10:53
Gammu: Insert SMS

Injecting a message using SQL

   To send a message, you can either use gammu-smsd-inject, which does all
   the magic for you, or you can insert the message manually. The simplest
   example is short text message:
          INSERT INTO outbox (
              DestinationNumber,
              TextDecoded,
              CreatorID,
@tomysmile
tomysmile / gammu-table-structure.md
Created November 18, 2015 11:19
Gammu: Table Structure

RECEIVING OF MESSAGES Received messages are stored in inbox table.

TRANSMITTING OF MESSAGES Transmitted messages are read from table outbox and possible subsequent parts of the same message from outbox_multipart.

DESCRIPTION OF TABLES daemons Information about running daemons.

@tomysmile
tomysmile / gammu-send-sms.md
Last active November 18, 2015 11:23
Gammu: Sending SMS

Sending SMS

Inject text message up to standard 160 chars:

echo "All your base are belong to us" | gammu-smsd-inject TEXT 123456

or

@tomysmile
tomysmile / gammu-install-osx.md
Last active January 14, 2024 03:24
Gammu: Install on OSX 10.11 with Wavecom Modem M1306B

Configuring Gammu for Mac OSX 10.11

Requirements

Step by step:

  • Type below command :
@tomysmile
tomysmile / gammu-configure-mysql.md
Last active June 3, 2017 05:57
Gammu: Configuring SMSD in OSX using MySQL Database

Configuring Gammu in OSX with MySQL

Requirements:

Step by step:

  • Check the sql files in here
@tomysmile
tomysmile / brew-install-mysql.md
Last active November 18, 2015 14:42
Mysql: Install MySQL v5.5 using Brew

Install brew first, then type below:

$ brew tap homebrew/versions
$ brew install mysql55

// unlink old mysql
$ brew unlink mysql

// new link for the 55 version
$ brew link --force mysql55
@tomysmile
tomysmile / linux-vhost.md
Last active November 26, 2015 19:40
Linux: How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS

Introduction

The Apache web server is the most popular way of serving web content on the internet. It accounts for more than half of all active websites on the internet and is extremely powerful and flexible.

Apache breaks its functionality and components into individual units that can be customized and configured independently. The basic unit that describes an individual site or domain is called a virtual host.

These designations allow the administrator to use one server to host multiple domains or sites off of a single interface or IP by using a matching mechanism. This is relevant to anyone looking to host more than one site off of a single VPS.

Each domain that is configured will direct the visitor to a specific directory holding that site's information, never indicating that the same server is also responsible for other sites. This scheme is expandable without any software limit as long as your server can handle the load.

@tomysmile
tomysmile / laravel-install-on-osx.md
Last active December 12, 2015 06:08
Laravel:Install on OSX

Install Composer

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Make sure you have /usr/local/bin in your PATH.

Install Laravel Globally

@tomysmile
tomysmile / ionic-change-nav-backbutton.md
Created December 19, 2015 10:58
ionic: change nav-back-button route
$rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {
   //assign the "from" or "to" parameter to something
console.log(from)
});

Pretty much you can see to.name as the page you are going to; and from.name as the state you are coming from.

 if (from.name == "app.view2" && to.name =="app.view1"){