Skip to content

Instantly share code, notes, and snippets.

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

Prahlad Yeri prahladyeri

🏠
Working from home
View GitHub Profile
@prahladyeri
prahladyeri / Crypto.java
Last active November 2, 2023 15:56
Basic implementation of text encryption/decryption in Java
package io.github.prahladyeri.utils;
import java.util.Arrays;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class Crypto
{
private String salt="972$%#@!)(><?|:}";
@prahladyeri
prahladyeri / checkpkg.py
Created November 2, 2023 13:50
Python script to check if specified package(s) are installed. Scan the requirements.txt instead, if no package specified.
##
# Check if specified package(s) are installed.
# Displays a GUI message if any aren't and asks to install.
import sys, os
import subprocess
import re
import importlib.util
import tkinter as tk
import tkinter.messagebox as messagebox
@prahladyeri
prahladyeri / pelican_to_jekyll.py
Created November 2, 2023 12:02
Script to convert existing markdown posts (*.md) in your content folder from pelican to jekyll format
##
# script to convert *.md posts in content folder to jekyll format
import os
import glob, re
def main():
files = glob.glob("content/*.md")
for fname in files:
lines = open(fname, encoding='utf8').readlines()
meta = {}
@prahladyeri
prahladyeri / flask_drive_example.py
Created December 30, 2016 12:51
google drive api implementation in python-flask framework
##
# Flask Drive Example App
#
# @author Prahlad Yeri <prahladyeri@yahoo.com>
# @date 30-12-2016
# Dependency:
# 1. pip install flask google-api-python-client
# 2. make sure you have client_id.json in this same directory.
import os
@prahladyeri
prahladyeri / console.php
Last active March 29, 2020 03:44
Tool to import disqus comments to the wordpress system.
<?php
/*
* Tool to migrate disqus comments to the wordpress system.
*
* @author Prahlad Yeri<prahladyeri@yahoo.com>
* @date 2017-09-06
*
* Updated on 2020-03-11: fixes and refactoring.
* */
require_once('disqus_parse.php');
@prahladyeri
prahladyeri / hacker_news.user.js
Created June 22, 2019 11:56
Adding the missing "My Posts" and "My Comments" links on top of HackerNews website
// ==UserScript==
// @name HN Addons
// @namespace https://prahladyeri.com
// @version 0.1
// @description Add custom bells and whistles to HN
// @author Prahlad Yeri
// @match https://news.ycombinator.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant none
// ==/UserScript==
@prahladyeri
prahladyeri / repo_puller.py
Created June 22, 2019 11:52
Pelican Plugin to fetch a given user's github repos in order of last commits
##
# Repo Puller
#
# @description A plugin to pull your github repositories
# @author Prahlad Yeri<prahladyeri@yahoo.com>
# @license MIT
# @date 2019-06-20
#
# @modified:
# 2019-06-22: Cleaned up source, removed comments.
@prahladyeri
prahladyeri / gmail_classic.user.js
Created August 28, 2018 16:14
Userscript to add auto-refresh functionality to GMail Classic
// ==UserScript==
// @name GMail Classic
// @namespace https://prahladyeri.com
// @version 0.1
// @description Add refresh timer to GMail Classic
// @author Prahlad Yeri
// @match https://mail.google.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant none
// ==/UserScript==
@prahladyeri
prahladyeri / style.css
Created June 16, 2018 10:06
Stylesheet for the /r/FreelanceProgramming subreddit.
div.sidebox.submit.submit-link a,
div.sidebox.submit.submit-text a,
div.sidebox.create div.morelink a
{
background-color: teal;
color: white;
font-family: monospace, mono, "Courier New", Courier;
letter-spacing: 0.1em;
}
@prahladyeri
prahladyeri / nice_reddit.user.js
Last active November 2, 2017 08:12
A Firefox user script to mark unread Reddit comments in blue background
// ==UserScript==
// @name Nice Reddit
// @namespace com.prahladyeri.userscripts.nice_reddit
// @creator prahladyeri@yahoo.com
// @description Beautify your Reddit!
// @homepage http://www.prahladyeri.com
// @include http://*.reddit.com/*
// @include https://*.reddit.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @version 1.2