Skip to content

Instantly share code, notes, and snippets.

View thenerdsuperuser's full-sized avatar
🌎
hosting globally

Parth Krishna thenerdsuperuser

🌎
hosting globally
View GitHub Profile
@thenerdsuperuser
thenerdsuperuser / backup.sh
Created May 30, 2021 13:50
Run this she'll script and all changes made to the desired folder will be monitored, added, commited and pushed to github. Think of it as a watchdog service.
#!/bin/sh
path="$HOME/backup"
while true
do
inotifywait --recursive -qq -e attrib,create,delete,modify,delete_self,move,move_self,close_write $path
cd $path
git add --all
now=$(date)
git commit -m "Auto-Commit at : $now"
git pull

Keybase proof

I hereby claim:

  • I am thenerdsuperuser on github.
  • I am thenerdsuperuser (https://keybase.io/thenerdsuperuser) on keybase.
  • I have a public key whose fingerprint is 770C 0A4C EB9E 48F5 AC68 460B 644F 3F23 2A33 8F27

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@thenerdsuperuser
thenerdsuperuser / mouse.txt
Created June 30, 2019 04:17
/etc/X11/xorg.conf.d/50-synatptics
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "ClickPad" "true"
Option "EmulateMidButtonTime" "0"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
in mousecatchall the first one
@thenerdsuperuser
thenerdsuperuser / mouse.txt
Created June 30, 2019 04:17
/etc/X11/xorg.conf.d/50-synatptics
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "ClickPad" "true"
Option "EmulateMidButtonTime" "0"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
in mousecatchall the first one
from flask import Flask, jsonify, request, abort
from flask import Response
import sqlite3
#import make_response
import hashlib
import json
from flask_cors import CORS
import base64
import datetime
import string
from flask import Flask, jsonify, request, abort
from flask import Response
import requests
import sqlite3
#import make_response
import hashlib
import json
from flask_cors import CORS
import base64
import datetime
@thenerdsuperuser
thenerdsuperuser / nearbySafe.js
Created March 30, 2019 15:00
This js function returns a list of all the nearby hospitals which are marked as safe zones and prints them out.
YOUR_API_KEY = ''
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script>
var map;
var service;
var infowindow;
function initialize() {
var pyrmont = new google.maps.LatLng(-33.8665433,151.1956316);
@thenerdsuperuser
thenerdsuperuser / install-docker.sh
Created March 27, 2019 02:33 — forked from dweldon/install-docker.sh
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@thenerdsuperuser
thenerdsuperuser / List.ipynb
Last active February 10, 2019 16:04
Trying out IPython
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.