Skip to content

Instantly share code, notes, and snippets.


Dost Muhammad Shah dmsherazi

View GitHub Profile
dmsherazi /
Last active Nov 6, 2019 — forked from jjvillavicencio/
Install Android SDK on Windows Bash (WSL)
sudo apt-get install unzip
unzip -d Android
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
# Download and build libcurl, openssl and zlib for Android using Crystax NDK r7
# Must be run on 32 bit Linux as the Crystax r7 NDK doesn't support 64 bit hosts
# Tested on Ubuntu 14.04
# Make the working directory
mkdir curl-android-build
cd curl-android-build
ROOT_DIR=`pwd -P`
dmsherazi /
Created Mar 12, 2019 — forked from braian87b/
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
dmsherazi / Makefile
Created Oct 18, 2018 — forked from hu55a1n1/Makefile
OpenWrt Makefile for Amfeltec Piranha USB FXO
View Makefile
# Copyright (C) 2014 - 2018
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# make package/feeds/telephony/amfeltec_usb/compile -j1 V=s
# Patch downloaded sources:
# Makefile -
dmsherazi / code.php
Created Feb 21, 2017 — forked from bappi-d-great/code.php
current_user_on_membership function for membership 2
View code.php
if( ! function_exists( 'current_user_on_membership' ) ) {
function current_user_on_membership( $membership_id ) {
$member = MS_Model_Member::get_current_member();
$membership_items = $member->get_membership_ids();
if( in_array( $membership_id, $membership_items ) ) {
return true;
return false;
dmsherazi / app-module-build.gradle
Created Jan 2, 2017 — forked from segunfamisa/app-module-build.gradle
Using gradle extra properties to manage Android dependency versioning
View app-module-build.gradle
// app module build.gradle
apply plugin: ''
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
applicationId "com.segunfamisa.gradleextraproperties"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
dmsherazi /
Created Oct 21, 2016 — forked from hu55a1n1/
PJSIP: Play incoming call on audio device in python
# Copyright (C) 2003-2008 Benny Prijono <>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
dmsherazi / Schema.php
Created Apr 11, 2016 — forked from tournasdim/Schema.php
A list of Laravel's Schema commands (Laravel 4)
View Schema.php
Schema::create('users' , function($table)
$table->increments('id'); Incrementing ID to the table (primary key).
$table->string('email'); VARCHAR equivalent column
$table->string('name', 100); VARCHAR equivalent with a length
$table->integer('votes'); INTEGER equivalent to the table
dmsherazi /
Created Feb 23, 2016 — forked from m2mIO-gister/
Example MQTT Messaging in Java
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.MqttTopic;
public class SimpleMqttClient implements MqttCallback {
dmsherazi / sim900.mdown
Created Nov 23, 2015 — forked from tegila/sim900.mdown
View sim900.mdown


Attach to GPRS Service

-> AT+CGATT = 1
<- OK

Define PDP Context (cid, PDP type, APN)

-&gt; AT+CGDCONT=1,"IP",""