Skip to content

Instantly share code, notes, and snippets.

View bhardwajRahul's full-sized avatar
🎯
Focusing

Rahul Bhardwaj bhardwajRahul

🎯
Focusing
View GitHub Profile
@bhardwajRahul
bhardwajRahul / request.php
Created January 19, 2019 15:49
API wrapper
<?php
namespace App\DistanceApi\Api;
/*
|--------------------------------------------------------------------------
| Request Class
|--------------------------------------------------------------------------
|
| This class is used when querying your API.
@bhardwajRahul
bhardwajRahul / Instructions.md
Created February 28, 2018 09:51 — forked from glocore/Instructions.md
Setup React Native on Ubuntu 16.04/16.10

1. Install Node.js

  • Follow the steps given here to install Node.js and NPM.
  • Verify whether NPM is installed by typing npm -v in a terminal window.

2. Install React Native CLI

  • npm install -g react-native-cli

3. Setup Android Development Environment

  • Download and install Android Studio as explained here.
  • Run Android Studio and open the SDK Manager. Under the SDK Platforms tab, check Show Package Details, expand Android 6.0 (Marshmallow) and check the following:
@bhardwajRahul
bhardwajRahul / ipcam.py
Created November 16, 2017 04:13 — forked from shihyuan/ipcam.py
Stream Video with OpenCV in Python from an Android running IP Webcam
# Stream Video with OpenCV from an Android running IP Webcam (https://play.google.com/store/apps/details?id=com.pas.webcam)
# Code Adopted from http://stackoverflow.com/questions/21702477/how-to-parse-mjpeg-http-stream-from-ip-camera
import cv2
import urllib2
import numpy as np
import sys
host = "192.168.0.220:8080"
if len(sys.argv)>1:
@bhardwajRahul
bhardwajRahul / ledctrl.py
Created November 13, 2017 19:31 — forked from electronut/ledctrl.py
A simple example for communicating with a Raspberry Pi from you phone's browser. Uses the Bottle Python web framework, and jQuery AJAX.
"""
ledctrl.py
A simple example for communicating with a Raspberry Pi from you phone's
browser. Uses the Bottle Python web framework, and jQuery AJAX.
Author: Mahesh Venkitachalam / electronut.in
"""
@bhardwajRahul
bhardwajRahul / dummy-web-server.py
Created October 24, 2017 05:32 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost