Skip to content

Instantly share code, notes, and snippets.


S. M. AMRAN smamran

View GitHub Profile

ADB Command

adb install app/build/outputs/apk/app-debug.apk
View MySQL

Linux Compile MySQL C Api Source Codes

>> gcc mysql_me.c  `mysql_config --cflags --libs`
View Linux
ps aux | grep firefox
sudo killall cupsd
sudo apt-get install htop
sudo renice -5 2744         // Give Priority 2744  0 to -5
df -ah
ls -alh /proc               // List of all active processes 
ls -alh /proc/1 | less      
smamran / Range Based For Loop
Last active Jan 26, 2016
Range Based For Loop C++
View Range Based For Loop

Range Based For Loop C++

#include <iostream>
#include <vector>
int main() 
    std::vector<int> v = {0, 1, 2, 3, 4, 5};
 for(const int &amp;i : v) // access by const reference

Qmake Qt MinGW Compile Qt project via Command Line

>> qmake
>> mingw32-make -f Makefile.Debug
  [-f Makefile.Debug = Optional]

MinGW Error In Compilation

gcc hello.c -o hello.o -lws2_32
View SDK

Run Prompt For Visual Studio Android Development

"C:\Program Files (x86)\Android\android-sdk\temp\ToolPackage.old01\android.bat"
View sqlite

Qt 5.5 for Desktop (MinGW 4.9.2 32 bit)

>> gcc shell.c sqlite3.c -lpthread -o gccsqlite3.exe

Developer Command Prompt for VS2015

>> cl shell.c sqlite3.c -Fesqlite3.exe
smamran / Useful Commands
Last active Jun 5, 2016
Useful Commands Linux
View Useful Commands

Search Text in Directory Files

>> grep -r "Searching_Text" *

Grep File Name Pattern Search Text

>> grep -r --include "*.txt" texthere .
>> grep -r ----exclude "*.txt" texthere .
smamran / Error
Last active Jun 5, 2016
Android Error Remove
View Error

Remove Android Lint Error

android {

    lintOptions {
        abortOnError false
View C And

Char to String conversion C++

    int i = 65;
    char c = i;
    string s;
    stringstream ss;
    ss << c;
    ss >> s;
    cout << s << endl;