Skip to content

Instantly share code, notes, and snippets.

Dost Muhammad Shah dmsherazi

Block or report user

Report or block dmsherazi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dmsherazi
dmsherazi / setup.sh
Last active Nov 6, 2019 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
View setup.sh
cd
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
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
View build-curl-android.sh
#!/bin/bash
# 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
dmsherazi / dumb-ap-wired-link.sh
Created Mar 12, 2019 — forked from braian87b/dumb-ap-wired-link.sh
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
View dumb-ap-wired-link.sh
@dmsherazi
dmsherazi / Makefile
Created Oct 18, 2018 — forked from hu55a1n1/Makefile
OpenWrt Makefile for Amfeltec Piranha USB FXO
View Makefile
#
# Copyright (C) 2014 - 2018 OpenWrt.org
#
# 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
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
<?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
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: 'com.android.application'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
applicationId "com.segunfamisa.gradleextraproperties"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
@dmsherazi
dmsherazi / sip_speaker.py
Created Oct 21, 2016 — forked from hu55a1n1/sip_speaker.py
PJSIP: Play incoming call on audio device in python
View sip_speaker.py
#!/usr/bin/python
#
#
# Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
#
# 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
dmsherazi / Schema.php
Created Apr 11, 2016 — forked from tournasdim/Schema.php
A list of Laravel's Schema commands (Laravel 4)
View Schema.php
<?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
dmsherazi / SimpleMqttClient.java
Created Feb 23, 2016 — forked from m2mIO-gister/SimpleMqttClient.java
Example MQTT Messaging in Java
View SimpleMqttClient.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
dmsherazi / sim900.mdown
Created Nov 23, 2015 — forked from tegila/sim900.mdown
SIM900 TIPS AND TRICKS
View sim900.mdown

TUTORIAL

Attach to GPRS Service

-> AT+CGATT = 1
<- OK

Define PDP Context (cid, PDP type, APN)

-> AT+CGDCONT=1,"IP","zap.vivo.com.br"
You can’t perform that action at this time.