Skip to content

Instantly share code, notes, and snippets.

View jitunayak's full-sized avatar
🏠
Working from home

Jitu Nayak jitunayak

🏠
Working from home
View GitHub Profile
@jitunayak
jitunayak / install fish shell and bobthefish theme.md
Last active August 11, 2019 16:11
install oh-my-fish on ubuntu 18.04

First install fish shell on your system

sudo apt-get update sudo apt-get install fish

Now install oh-my-fish

sudo apt-get update
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install > install
fish install

APFS support on Linux

  sudo apt update
  sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc-c++ git libattr1-dev

  git clone https://github.com/sgan81/apfs-fuse.git
  cd apfs-fuse
  git submodule init
 git submodule update
@jitunayak
jitunayak / Calender Scheduling program.py
Created February 20, 2020 20:01
problem: Find the free slots from two persons calender's schedule
# Calender Scheduling program
# Solved by Jitu Nayak
# Email id : [email protected]
# problem: Find the free slots from two persons calender's schedule
c1 =[['9:30','10:30'],['13:00','14:00']] #calender schedule for person1
c2 =[['9:00','10:00'],['12:00','12:30']] #calender schedule for person2
ss=[360,] #let person1 starts job at 6:00 morning
ee=[480,] #let person2 starts job at 8:00 monring
SUPERDUPER SERIAL
SUPERDUPER SERIAL:
LAST CHECKED WORKING IN VERSION 3.3.1
NAME: Serial_Box
SERIAL: SPSD001613-C55P-20F5-012L-XVSE-11E3

To reduce the dock hide and opening time:

defaults write com.apple.dock autohide-delay -float 0

to move files :

cmd+c -> cmd+alt+v

kill apps from recent apps

cmd+tab select the app and press Q to quite

echo "# CupCake-Store" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/jitunayak/CupCake-Store.git
git push -u origin master
mport mysql.connector
import flask
from flask import request, jsonify
app = flask.Flask(__name__)
app.config["DEBUG"] = True
mydb = mysql.connector.connect(
host="localhost",
@jitunayak
jitunayak / client_flask_image_API.py
Last active April 3, 2020 21:20
send image to flask REST API
from __future__ import print_function
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/iamge/api'
# prepare headers for http request
content_type = 'image/jpeg'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import java.io.IOException;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;