Skip to content

Instantly share code, notes, and snippets.

View arvind-india's full-sized avatar

Arvind Singh arvind-india

  • Bangalore
View GitHub Profile
@arvind-india
arvind-india / replace-var
Created October 11, 2017 05:35
Shell script to replace variables docker-compose.yml
#!/bin/bash
set -eu
main() {
local args=("$@")
local inFile=$(pwd)/docker-compose.yml
local outFile=$(pwd)/$1
if [[ $# -lt 2 ]]; then
usage
@arvind-india
arvind-india / _01.temp_sensor_01.ino
Created November 28, 2017 19:05 — forked from chaeplin/_01.temp_sensor_01.ino
esp8266+dht22+mqtt
// Code based on
// https://github.com/adafruit/DHT-sensor-library/blob/master/examples/DHTtester/DHTtester.ino
// https://gist.github.com/igrr/7f7e7973366fc01d6393
// https://github.com/iot-playground/Arduino/blob/master/ESP8266ArduinoIDE/DS18B20_temperature_sensor/DS18B20_temperature_sensor.ino
// esp8266 + dht22 + mqtt
#include "DHT.h"
#include <PubSubClient.h>
#include <ESP8266WiFi.h>

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
@arvind-india
arvind-india / BeaconResearch.md
Created February 1, 2018 22:21
iBeacon / Beacon Research
@arvind-india
arvind-india / README.md
Created June 9, 2018 16:38 — forked from tywhang/README.md
Easily add Charts into Dashing with Chartjs (Line, Bar, Radar, Polar Area, Pie, Doughnut)

dashing-chartjs

An easy interface to use all of chartjs.org's charts.

Inspired by my own pain and suffering of trying to add a simple chart to dashing

Make awesome charts like these:

@arvind-india
arvind-india / README.md
Created June 9, 2018 16:38 — forked from tywhang/README.md
Easily add Charts into Dashing with Chartjs (Line, Bar, Radar, Polar Area, Pie, Doughnut)

dashing-chartjs

An easy interface to use all of chartjs.org's charts.

Inspired by my own pain and suffering of trying to add a simple chart to dashing

Make awesome charts like these:

private void init()
{
WebView webview = (WebView) findViewById(R.id.webview);
WebSettings settings = webview.getSettings();
settings.setJavaScriptEnabled(true);
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
PdfWebViewClient pdfWebViewClient = new PdfWebViewClient(this, webview);
pdfWebViewClient.loadPdfUrl(
"https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwjgwIfp3KXSAhXrhFQKHQqEDHYQFggZMAA&url=http%3A%2F%2Fwww.orimi.com%2Fpdf-test.pdf&usg=AFQjCNERYYcSfMLS5ukBcT2Qy11YxEhXqw&cad=rja");
@arvind-india
arvind-india / ProxySettings.java
Created August 13, 2018 18:22 — forked from madeye/ProxySettings.java
Set proxy for Android Webview
package me.madeye;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.http.HttpHost;
import android.content.Context;
@arvind-india
arvind-india / peopleCounter.py
Created September 5, 2018 16:32 — forked from jotathebest/peopleCounter.py
Pedestrian detector that sends people counter results to Ubidots. Libraries: OpenCV, requests, imutils
from imutils.object_detection import non_max_suppression
import numpy as np
import imutils
import cv2
import requests
import time
import argparse
import time
'''
@arvind-india
arvind-india / run-custom-cascade.py
Created October 23, 2018 13:09 — forked from keithweaver/run-custom-cascade.py
Object detection using custom Haar Cascade on an image with OpenCV
# Running:
# $ python run-custom-cascade.py
# Import OpenCV
import cv2
# Image file
IMAGE_FILE = './example.png' # Change this to be your image
# Cascade file