Skip to content

Instantly share code, notes, and snippets.

View prog110's full-sized avatar

prog110 prog110

View GitHub Profile
@prog110
prog110 / books-to-search-for.md
Created February 19, 2023 13:51
Books not available online, need to search for

David Williams, Not In the Public Interest: The Problem of Security in a Democracy

@prog110
prog110 / ChunksAudioFetcherAndPersister.java
Last active September 19, 2022 22:24
Spring Reactor Netty reactive(non-blocking) websocket integration that converts a text file into audio. Splits file into chunks, over websocket (text & binary frames) downloads multiple binary audio fragments for each chunk, merges all fragments into a chunk file, finally merges all chunk files into final mp3 from Azure without blocking threads
package com.acme.tts.converter.microsoft.ssml.websocket;
import com.acme.tts.converter.microsoft.ssml.Prosody;
import com.acme.tts.converter.microsoft.ssml.Speak;
import com.acme.tts.converter.microsoft.ssml.Voice;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
@prog110
prog110 / mitmproxy-wireshark-java-curl-reactor-netty.md
Last active September 19, 2022 00:28
Configuring mitmproxy, wireshark, curl, java, reactor netty to capture packets (pcap) so SSL/TLS/HTTPS/WSS traffic can be analysed in Ubuntu 20

Configuring mitmproxy, wireshark, curl, java, reactor for packet capture (pcap)

Install mitmproxy

Ensure you have python3 installed locally. Then install mitmproxy by running

pip install pipx mitmproxy
# configures path to use mitmproxy, mitmweb & mitmdump
pipx install mitmproxy
@prog110
prog110 / ubuntu-compose-key-shortcuts.txt
Created May 5, 2021 22:09
Typing special Ubuntu using compose key
<character>|<chars to type>|<meaning>
—|minus,minus,minus|em dash
–|minus,minus,period|en dash
⇒|equal,greater|Rightwards double arrow
•|period,equal|Filled bullet
≠|equal,slash|Not equal to
≠|slash,equal|Not equal to
→|minus,greater|Rightwards arrow
←|less,minus|Leftwards arrow
⓪|parenleft,0,parenright|Circled digit 0
@prog110
prog110 / generate-merged-pdf-from-png-and-jpg.sh
Last active April 17, 2021 00:25
Convert png, jpg files to pdf, combine them into a merged pdf
# Code for downloading Google books is present in tts-converter/DownloadGoogleBooks.kt
for i in $(find . -maxdepth 1 -name "*.png" -print | sort -V -k1); do pdfjam --outfile ${i//png/pdf} $i; done
for i in $(find . -maxdepth 1 -name "*.jpg" -print | sort -V -k1); do pdfjam --outfile ${i//jpg/pdf} $i; done
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=merged.pdf -dBATCH `find . -maxdepth 1 -name "*.pdf" -print | sort -V -k1`
@prog110
prog110 / Scroll ad remover.user.js
Created March 25, 2021 11:26
Scroll.in ad remover
// ==UserScript==
// @name Scroll ad remover
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://scroll.in/article/*
// @grant none
// ==/UserScript==
@prog110
prog110 / indianexpress cleanup.user.js
Last active September 1, 2021 20:35
indianexpress cleanup
// ==UserScript==
// @name indianexpress cleanup
// @namespace http://tampermonkey.net/
// @version 0.1
// @author You
// @match https://indianexpress.com/article/*
// @grant none
// ==/UserScript==
(function() {
@prog110
prog110 / Lexico beautifier.user.js
Last active January 11, 2022 21:06
Lexico beautifier.user.js
// ==UserScript==
// @name Lexico beautifier
// @namespace http://tampermonkey.net/
// @version 0.1
// @author You
// @match https://www.lexico.com/en/definition/*
// @match https://lexico.com/en/definition/*
// @match https://www.lexico.com/definition/*
// @match https://lexico.com/definition/*
// @grant none
@prog110
prog110 / Twitter- Prepare tweets for screenshots.user.js
Last active September 17, 2020 19:52
Twitter- Prepare tweets for screenshots
// ==UserScript==
// @name Twitter: Prepare tweets for screenshots
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*twitter.com/*/status/*
// @grant none
// ==/UserScript==
@prog110
prog110 / Beautifier - Spring Documentation.user.js
Last active January 17, 2020 07:19
Beautifier: Spring Documentation
// ==UserScript==
// @name Beautifier: Spring Documentation
// @namespace http://tampermonkey.net/
// @version 0.1
// @author You
// @match https://docs.spring.io/*/reference/htmlsingle*
// @grant none
// ==/UserScript==
(function() {