Skip to content

Instantly share code, notes, and snippets.

View v-sukt's full-sized avatar

Rajshekhar K v-sukt

  • India
View GitHub Profile
#!/bin/bash
curr_time=$(($(date +%s) * 1000)) # current millis - for exact value use https://currentmillis.com language examples
username="myusername"
read -s -p "Password:" pass_val
echo
# This is for a sample gateway 192.168.10.1:8090 which acepts login via login.xml
# we can get a command for this with F12/developertools|options for firefox chrome and click such file
# then get the curl request posted earlier - for encoding url use --data-urlencode option rest is simple
@v-sukt
v-sukt / split_lines.bash
Created July 31, 2019 12:43
Split file on basis of lines - like big csv file
#!/usr/bin/env bash
#cp ${1} ${1}-$(date +%s).bkp
lines=2 # indicate the number of lines each split should have
last_line=1
count=0
end=$(wc -l <${1})
while [[ ${last_line} -lt ${end} ]]; do
@v-sukt
v-sukt / extract_pdf_notes.py
Last active February 29, 2024 06:44 — forked from Samathy/dumppdfcomments.py
Python Script to extract highlighted text, images(square/rectangle - e.g the table you highlight with box) and Text annotations from PDFs. Uses python-poppler-qt5 and PyQt5. Updated https://stackoverflow.com/questions/21050551/extracting-text-from-higlighted-text-using-poppler-qt4-python-poppler-qt4 with some minute modifications.
import popplerqt5
import sys
import PyQt5
resolution = 150
def main():
doc = popplerqt5.Poppler.Document.load(sys.argv[1])
total_annotations = 0