Skip to content

Instantly share code, notes, and snippets.

View raikusy's full-sized avatar
:electron:
Reacting 🌸

Rakibul Hasan raikusy

:electron:
Reacting 🌸
View GitHub Profile
@rphlmr
rphlmr / helpers.ts
Last active June 15, 2024 20:31
Drizzle ORM, deep sub queries
/* -------------------------------------------------------------------------- */
/* More here; */
/* -------------------------------------------------------------------------- */
//gist.github.com/rphlmr/0d1722a794ed5a16da0fdf6652902b15
https: export function distinctOn<Column extends AnyColumn>(column: Column) {
return sql<Column["_"]["data"]>`distinct on (${column}) ${column}`;
}
export function jsonBuildObject<T extends SelectedFields>(shape: T) {
@sjsakib
sjsakib / README.md
Last active February 6, 2020 21:59
This script gets a random featured image from unsplash.com and sets it as your desktop background. Works on `gsettings` supported linux distros. Tested on Ubuntu 19.10 (Gnome). Requires the `requests` module to be installed. It takes some time to download the photo. So, wait patiently after executing the script. You can use `anacrontab` to run i…

This script gets a random featured image from unsplash.com and sets it as your desktop background. Works on gsettings supported linux distros. Tested on Ubuntu 19.10 (Gnome). Requires the requests module to be installed.

It takes some time to download the photo. So, wait patiently after executing the script.

You can use anacrontab to run it daily or weekly. See http://bit.ly/371ybhq

@jpswade
jpswade / devops_best_practices.md
Last active July 11, 2024 16:16
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing