Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
If we have two tables, people and groups, where people has a column group_ids which is an array of ids from groups, we can map the array of ids to the matching name from groups using the following query: select p.email as email, coalesce(groups.na…
-
payments customer_id payment_id payment_amount payment_date If you want to count the number of days between each payment and today then you can use extract function with days as a parameter: select payment_id, payment_date, extract(days from now()…
-
payments customer_id payment_id payment_amount payment_date If we want to see the payment_id of the highest amount of payment for each customer_id then we need to do: select distinct customer_id, first_value(payment_id) over (partition by customer_id…
-
For many years I had a slight frustration with Mac's default file explorer utility Finder that it was not exposing any convenient way to go to a given path without making me click through those folders individually.
-
I store birthdays of my contacts right in my contacts application on phone.
-
Extract audio from .webm to .mp3 FILE="the-file-you-want-to-process.webm" ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3" Credits: Bytefreaks.net Merge subtitle (srt) files with video files ffmpeg -i video.mp4 -i subtitle.srt -c copy -c:s
-
Use this command to view the top-5 most used commands on your Mac terminal history | awk 'BEGIN {FS="[ \t]+|\\|"} {print $5}' | sort | uniq --count | sort --reverse --sort=numeric | head --lines 5
-
wget --output-document "<filename-goes-here>" --continue "<file-url-goes-here>"
-
I was trying to find the root-cause of a memory leak and amongst many different rabbit holes, I learnt how to take the heap-dump from an application running on JVM.
-
So there can be the case that your Figma file is showing that there are styles defined and present in the file, but when querying it via the API endpoint to get file-styles (/v1/files/<file-id>/styles) it might return empty styles array.
-
These are a bunch of simple and harmless (especially HR safe) pranks you can pull on your colleagues: Wear a different name tag every day Come to office with a different name tag stuck to your shirt every day.
-
There are 2 ways to provide username and password when downloading files using wget Directly as parameters wget --user "<username-goes-here>" --password "<password-goes-here>" "<file-url-goes-here>" This has the disadvantage that it will show up in your s…
-
TLDR: This is how you surround a regular (capturing) group in regex ().
-
This is a list of interesting/useful fonts which can be used: Saira Chakra Petch Cinzel Lkdown Graph Katwijk Mono Turbeu Parkly
-
Today (well actually this past Sunday) I learned that nations also have something known as their "National Aquatic Animal" (NAA).
-
The below collection of characters are readable and individually distinguishable to make alphanumeric passwords out of abcdefghjkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWXY3456789
-
So I finally finished a side-project after a long time and rolled it out public.
-
I wanted to see the list of files committed in my last commit git show --pretty="" --name-only <sha1-commit-hash>
-
We can use flexbox to do this.
-
Resize images to specific target size while padding remaining space with transparency convert -auto-orient -background "#00000000" original.jpg -resize 720x576 -gravity center -extent 720x576 resized.png Resize all images of a file-type inside a folder for
-
I had to resize a bunch of images today to a specific target size while padding the remaining space with a transparent background.
-
Use a separate file to record already downloaded URLs youtube-dl --download-archive archive.txt "https://www.youtube.com/watch?
-
If you have two instances of BigDecimal as following val a = 7.5.toBigDecimal() val b = 7.50.toBigDecimal() It seems that they are equal in value and should return true when doing a == b but they don't.
-
Context: Any file appearing to be stored in SourceDirectory are actually stored in DestinationDirectory.
-
I found this awesome piece of writing a few months ago on the website Almost No One is Evil.
-
In one of our chess games at work I learnt that you cannot perform the castle move with King if the blocks where the king has to pass through or end at are under threat from any of opponent's piece(s).
-
I came across this concept the other day called "Ugh Fields".
-
If you are working with a long command in your terminal and want to edit parts of it, Ctrl+X followed by a Ctrl+E (don't lift your finger from Ctrl between them) will open the command you are currently editing into the program specified in your $EDITOR en…
-
Dump database to a script (.sql) file Extract/Dump the database contents to a script (.sql) file pg_dump -f ~/path/to/file.sql $YOUR_DATABASE_URL Run a script (.sql) from file on a database Run SQL commands from a file on a database psql $YOUR_DATABASE_URL
-
One of my friend emailed me today saying that he wants to build a RISC-V PC and was asking for any tips/advice on the basic dos and don'ts and suggested that I can make it into a blog-post.
-
According to Google's docs on OAuth, the server application gets refresh_token from Google (on exchanging the auth code) only if the original redirection request to Google contains the param access_type with value offline (documentation link).
-
Since JavaScript does not have the concept of a throwable type.
-
There is a simple CSS media query with which we can specify styles only for dark mode or light mode.
-
This week I was talking to a friend and the discussion somehow turned onto emails.
-
So finally I couldn't finish the list of books from last post before the year ended.
-
This will be the first year in review I have ever written.
-
Last week I was working on something which required me to convert LocalDateTime to Instant.
-
This is first in my collection of cheat-sheets.
-
Today I finished the second book for my end of year reading challenge.
-
People who know me know that I care about my physical health, and due to that I have taken on numerous fitness challenges in the past to gamify my exercises and to keep myself consistent.
-
So I finished my first book for the challenge last night.
-
This week I learned about a software principle that aims to make developer's lives easier.
-
This will be a really short post.
-
Entering the maze Recently in one of the projects I was trying to make a POST request to an external API.
-
Recently I realized that my attention span and ability to focus have drastically reduced over the past 2 years.
-
Hi folks, these are the interesting things I found during this week.
-
Hi folks, these are the interesting things I found during this week.
-
Hi folks, this is the second edition of my new experiment where I list articles, podcasts, videos or basically anything I found interesting during last week.
-
Hi fellows, I am starting a new experiment, where I would be listing some articles, podcasts, videos or basically anything I found interesting that week into a post.
-
There is a typical use-case in apps where once the user has logged in, you won't want them to return to login screens when they press back.