Skip to content

Instantly share code, notes, and snippets.

View vimalvnair's full-sized avatar

Vimal V Nair vimalvnair

View GitHub Profile
@vimalvnair
vimalvnair / check_networks_and_restart.rb
Last active March 30, 2021 14:25
Monitor network connections and restart it if needed [Raspberry PI]
def ping host
system("ping -c 1 #{host}")
end
loop do
sleep 60
unless ping('google.com') || ping('facebook.com') || ping('wikipedia.org')
`sudo ifconfig eth0 down`
sleep 5
@vimalvnair
vimalvnair / image_match.py
Created April 17, 2019 06:53
image_match
# import the libraries
import os
import face_recognition
# make a list of all the available images
images = os.listdir('images-reg')
# load your image
image_to_be_matched = face_recognition.load_image_file('George.jpg')
@vimalvnair
vimalvnair / active_devices.md
Last active August 29, 2015 13:56
Active Devices
  • A device is considered as active for a particular day if:
    • it has status as 'Active', and
    • it sends 20 or more heartbeats on the same day (a heartbeat is sent once in every 10 minutes).
  • If no active devices are found for a particular speciality, that speciality will not displayed on the table.
  • Days are calculated based on UTC Time Zone.
{
"name": "Finding Your RA Support Network",
"video": "RA_Finding_Your_RA_Support_Network.mp4",
"remoteVideoUrl": "https://mdm-server-staging.s3.amazonaws.com/uploads/videos/2014/1/30/69/RA_Finding_Your_RA_Support_Network.mp4",
"poster": "RA_Finding_Your_RA_Support_Network.png",
"remoteThumbnailUrl": "https://mdm-server-staging.s3.amazonaws.com/uploads/video_thumbnails/2014/1/30/69/RA_Finding_Your_RA_Support_Network.png",
"age": [
"child",
"senior"
],
@vimalvnair
vimalvnair / gist:8666879
Last active January 4, 2016 19:19
Clinic website details; *Important* In the "url", please DONOT forget to have 'http://' in the beginning .
/* For single clinic custom website */
{
"title": "JointMan",
"position": "3",
"websites": [
{
"title": "",
"url": "https://www.t3treattotarget.com/",
"showZoomControls": false,
"desktopVersion": false
@vimalvnair
vimalvnair / clinic.json
Last active January 4, 2016 19:19
clinic.json with 'Clinic website details'
{
"clinicInformation": {
"clinicId": "8899",
"assetId": "a345",
"clinicName": "ContextMedia",
"examRoom": "Room 1",
"groupName": "",
"networkName": "",
"mountType": "",
"customVideoInformation": {
{
"sponsor_ads": [
{
"type": "flash",
"sponsor": "Humira",
"conditions": [
"Rheumatoid Arthritis",
"Lupus",
"Fibromyalgia",
"Osteoarthritis",
{
"Monday": {
"wake_up": ["7:00"],
"sleep":["17:00"]
},
"Tuesday": {
"wake_up": ["7:00"],
"sleep":["17:00"]
},
"Wednesday" : {