I am currently learning SQL/Python, I often just wanted to know the headers and how many rows are in a CSV file, so I just wrote a small Python script for it. import csv import readline readline.set_completer_delims(' \t\n=') readline.parse_and_bind("tab: complete") def csvOpen(file): with open(file, "r", newline='', encoding='utf-8-sig') as csvfile: reader = csv.reader(csvfile) i = next(reader) dRows = sum(1 for lin…
This can be done using two lines of Bash - `head -n 1 ` to get headers - `wc -l ` to count number of rows
Ask HN: Tools you have made for yourself?
271–280 of 458 posts
Re: Ask HN: Tools you have made for yourself?
#272Recently I released a webapp to fix a problem I faced. I can paste any image from my clipboard (mostly screenshot in my case) to get its base64 version so I can integrate it directly in any markdown: https://paste64.vercel.app/ It was also an excuse to try out Svelte with TypeScript: https://github.com/aloisdg/paste64
Seems like a fun learning project, but in the real world it's very counterproductive. You can obtain the base64 representation of the current clipboard contents very quickly using a single terminal shell command.
Re: Ask HN: Tools you have made for yourself?
#273Re: Ask HN: Tools you have made for yourself?
#274I wrote a command line journal called 'did' that shows me what I did on this day over the last five years (like a 5 year diary). I enter a ton of items every day which all end up in text files. Only items including an asterisk will be repeated back to me in future years. Inspired by: https://news.ycombinator.com/item?id=17538697
Re: Ask HN: Tools you have made for yourself?
#275== killUnusedTerminalsAndBC.sh == This kills off any open bc instances I have, and then any open rxvts I have which aren't running another program After a day or so I can easilly have 100+ rxvts in the background, some of which are running vim, some sshed into other servers, but many of which are just old windows I ran to do something briefly but never killed off == another config differ == Someone else on the team h…
Re: Ask HN: Tools you have made for yourself?
#276Re: Ask HN: Tools you have made for yourself?
#277Made something really similar to apple's recently unveiled "universal control," but from Windows -> Mac. Lets me have the mouse wander off the side of the screen if "pushed hard" and it "pops out" on the mac. It has some issues with modifiers sticking and it's hard-coded to my network IPs and screen resolutions, PLUS it requires an unrelated tool I made to actually build the thing; it's on my "open source someday" li…
Synergy does this really well https://symless.com/synergy
Re: Ask HN: Tools you have made for yourself?
#278I’ve used it to build datasets for various research purposes, and also an archive tool for the now-extinct soup.io: https://github.com/nathell/soupscraper
Re: Ask HN: Tools you have made for yourself?
#279Recently I released a webapp to fix a problem I faced. I can paste any image from my clipboard (mostly screenshot in my case) to get its base64 version so I can integrate it directly in any markdown: https://paste64.vercel.app/ It was also an excuse to try out Svelte with TypeScript: https://github.com/aloisdg/paste64
Seems like a fun learning project, but in the real world it's very counterproductive. You can obtain the base64 representation of the current clipboard contents very quickly using a single terminal shell command.
You hit ctrl+v and click a button using the app, that is roughly equally, if not more, convenient than switching to a terminal and entering a command.
Re: Ask HN: Tools you have made for yourself?
#280A couple years ago I moved somewhere where my only internet option is satellite (HughesNet). The data caps are pretty low (50 GB per month) but if you use data on the “bonus zone” (midnight to 8am IIRC) you get an additional 50GB quota, so I wrote a tool that lets me queue up YouTube videos to download in the middle of the night. It’s a pretty simple collection of scripts that shell out to youtube-dl. I wrote it in T…