Tagged: hacks

0

Extracting table and column names from SQL query

(Not original article) sql-metadata is a Python library that uses a tokenized query returned by python-sqlparse and generates query metadata. This metadata can return column and table names from your supplied SQL query. Here are a couple of example from the sql-metadata github readme:...

0

MacOS tips

Hide a user account in MacOS https://support.apple.com/en-us/HT203998 https://www.reddit.com/r/macsysadmin/comments/emxph7/catalina_create_a_hidden_user/ https://github.com/gregneagle/pycreateuserpkg Creating user account https://apple.stackexchange.com/questions/226073/how-do-i-create-user-accounts-from-the-terminal-in-mac-os-x-10-11 https://sterlingit.com.au/how-to-create-a-user-or-admin-user-in-osx-apple-mac-via-terminal-commands-in-9-simple-steps/ https://mackeeper.com/blog/post/356-using-various-types-of-user-accounts-on-mac/   Find files created or modified by an installer http://hints.macworld.com/article.php?story=20091223115101622   Related posts: Super charge bash with these bash_profile tips Hadoop mapreduce not working on...

0

WSL2 configuration

X11 forwarding on WSL2 More info here ~/.bashrc export DISPLAY=$(awk ‘/nameserver / {print $2; exit}’ /etc/resolv.conf 2>/dev/null):0 export LIBGL_ALWAYS_INDIRECT=1   Windows links for linux apps in WSL Adds linux GUI application menu to a windows toolbar https://github.com/cascadium/wsl-windows-toolbar-launcher Related posts: Access...

0

Windows terminal settings

Settings of my Windows terminal are getting stashed for saving another day :p
Background images, styling to the terminal windows.

0

Connecting to remote server using a jump server (SSH tunneling)

Problem statement There are 3 hosts, Host-user – one that you are on Host-jump – one that has connectivity to database server Host-database – database server Host-user wants to connect to Host-database using Host-jump. Solution Setup ssh tunnel with local...

0

Cleanup hdfs directory having too many files and directories

At times some directories on hdfs has too many inodes (files and folders) and it is really hard to delete. Some instances also lead to out of memory (OOM) errors such as the following error, INFO retry.RetryInvocationHandler: java.io.IOException: com.google.protobuf.ServiceException: java.lang.OutOfMemoryError:...

0

Download m3u8 URL video to local

Follow below steps to download video from a webpage Step 1: Finding m3u8 URL from webpage Open Chrome Developer tools and click the Network tab Navigate to the page with the video and get it to start playing Filter the...