Skip to content

Instantly share code, notes, and snippets.

@VenkataRaju
VenkataRaju / TeluguMaasaaluRutuvulu.html
Last active January 21, 2020 01:52
భారతదేశంలోని ఋతువులు, అవి ఏ మాసంలో వస్తాయి, వాటి లక్షణాలు Telugu Maasaalu Rutuvulu
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>భారతదేశంలోని ఋతువులు, అవి ఏ మాసంలో వస్తాయి, వాటి లక్షణాలు</title>
<style>
body
{
text-align: center;
cursor: default;
@VenkataRaju
VenkataRaju / util.js
Last active October 17, 2018 19:36
JavaScript Utility Functions
function findCssRule(selectorText)
{
for (let styleSheet of document.styleSheets)
for (let cssRule of styleSheet.cssRules)
if (cssRule.selectorText === selectorText)
return cssRule;
throw Error(`Rule with selectorText '${selectorText}' is not found`);
}
/**
@VenkataRaju
VenkataRaju / Util.java
Last active June 29, 2021 17:16
Java Util
public final class Util
{
/** Returns unique parent paths without their child paths */
public static Collection<Path> uniqueParentPaths(Collection<Path> paths)
{
if (paths.isEmpty())
return Collections.emptySet();
Set<Path> parentPaths = new TreeSet<>(paths);
@VenkataRaju
VenkataRaju / Ubuntu Softwares.txt
Last active June 6, 2021 10:11
Ubuntu Softwares
Notepadqq: Text editor
Meld: Text files diff and merge (No context menu to select 2 files and open the application)
KDiff3: Text files diff and merge (Context menu to select 2 files and open the application. Also select files one after the other)
KDiff is creashing. Meld is better though there is no context menu
Firefox
Useful Addons:
1) Complete Youtube Saver
2) Disable Ctrl-Q shortcut
@VenkataRaju
VenkataRaju / After Ubuntu Installation.txt
Last active March 16, 2023 13:37
After Ubuntu Installation
1) Install QuiteRSS (Instructions https://quiterss.org/quiterss-for-other-os)
sudo add-apt-repository ppa:quiterss/quiterss
sudo apt-get update
sudo apt-get install quiterss
Note: While copypasting above commands from the website, first copy them to notepad (some characters seem to be causing problem, installation stalls)
2) Disable guest session (Ubuntu 16.04)
sudo sh -c 'printf "[Seat:*]\nallow-guest=false\n" >/etc/lightdm/lightdm.conf.d/50-no-guest.conf'
To undo (restore Guest option), remove the file created:
sudo rm /etc/lightdm/lightdm.conf.d/50-no-guest.conf
More info: https://askubuntu.com/questions/62564/how-do-i-disable-the-guest-session
@VenkataRaju
VenkataRaju / FFMPEG Notes.txt
Last active October 15, 2017 13:42
FFMPEG Notes
1) ffmpeg -v warning -ss ${skip_time_in_secs} -t ${duration_in_secs} -i inputfile.mp4
2) GIF generation
a) Generate a palette:
ffmpeg -y -ss 30 -t 3 -i input.flv \
-vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
b) Output the GIF using the palette:
ffmpeg -ss 30 -t 3 -i input.flv -i palette.png -filter_complex \
"fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
@VenkataRaju
VenkataRaju / KotlinAnnoyances.md
Last active March 16, 2020 15:55
Kotlin Annoyances
@VenkataRaju
VenkataRaju / Windows Softwares.txt
Created September 1, 2017 13:38
Windows Softwares
Audacity
Mp3 Direct Cut
Datebase: Derby, H2, Oracle
Dim Screen
HTTrack - to download websites
FileZilla, WinSCP
GIF: GifCam.exe, giftedmotion-1.23.jar, IceCreamLeg.exe, QGifer-0.2.1-Setup.exe
Gimp
ImageViewers: IrfanView, FSViewer56
PhantomJS
@VenkataRaju
VenkataRaju / YoutubeDL Notes.txt
Last active November 30, 2017 19:40
YoutubeDL Notes
1. To know the formats available
youtube-dl.exe -F "https://www.youtube.com/watch?v=url"
2. Then download specific format
youtube-dl.exe -f 22 "https://www.youtube.com/watch?v=url"
3. youtube-dl.exe -f 137+140 --no-playlist "https://www.youtube.com/watch?v=url"
4. Best video of type mp4 and audio of type m4a
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]'
5. ./youtube-dl -x --audio-format mp3 --audio-quality 128K --embed-thumbnail "https://www.youtube.com/watch?v=url"
-x: extracts audio
6.
@VenkataRaju
VenkataRaju / DelayedTaskSkipTest.java
Last active August 12, 2017 10:44
Skip the current iteration of the task if the previous iteration took more time than the expected time
public class DelayedTaskSkipTest
{
public static void main(String[] args) throws Throwable
{
long delayBetweenTaskIterationsInMillis = 2000;
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask()
{
int i = 1;