Skip to content

Instantly share code, notes, and snippets.

View SubhrajitPrusty's full-sized avatar
💭
procrastinating

Subhrajit Prusty SubhrajitPrusty

💭
procrastinating
View GitHub Profile
@SubhrajitPrusty
SubhrajitPrusty / gifwall.sh
Last active October 24, 2018 20:21
Set an animated wallpaper
# use ffmpeg to get images from video
# ffmpeg -i input.mp4 -vf fps=30 ~/gif/giffy%03d.bmp
# gets 30 images per second
# use -ss to skip to time, and -t to set duration
# script is better than standalone command, due to behavior when force quitting
while true; do for i in ~/gif/*.*; do feh --bg-fill $i; done; done
@SubhrajitPrusty
SubhrajitPrusty / sendMail.py
Last active October 22, 2018 14:36
Send a mail with python
import smtplib
import getpass
me = input("Enter sender email : ") # sender email, must enable LessSecureApps
user = me
pwd = getpass.getpass("Enter password for {} : ".format(user))
# you == the recipient's email address
you = input("Enter receiver email : ") # receiver email
msg = {}
@SubhrajitPrusty
SubhrajitPrusty / record_screen.sh
Last active March 10, 2021 14:32
Record screen using ffmpeg
# record for 30 seconds
# LINUX
ffmpeg -f x11grab -t 30 -i :0 -y record.mp4
# WINDOWS
ffmpeg -f gdigrab -t 30 -i desktop -y record.mp4
@SubhrajitPrusty
SubhrajitPrusty / gitseminar.md
Last active October 22, 2018 14:37
Topic Covered in Github Seminar [CODEX]

Github Seminar

Topics


  • What is Git and Github?
  • Usage of git and Github
  • Difference between git and Github.
  • Setting up Git on different platforms.

Github

@SubhrajitPrusty
SubhrajitPrusty / gcd_lcm.py
Created January 7, 2018 17:44
LCM of a list of numbers
from functools import reduce
def gcd(a,b):
if b%a == 0:
return a
else:
return gcd(b%a, a)
def lcm(*args):
def lcm(a,b):