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
@raikusy
raikusy / helpers.ts
Created December 7, 2023 07:27 — forked from rphlmr/helpers.ts
Drizzle ORM, deep sub queries
export function distinctOn<Column extends AnyColumn>(column: Column) {
return sql<Column["_"]["data"]>`distinct on (${column}) ${column}`;
}
export function jsonBuildObject<T extends SelectedFields>(shape: T) {
const chunks: SQL[] = [];
Object.entries(shape).forEach(([key, value]) => {
if (chunks.length > 0) {
chunks.push(sql.raw(`,`));
@raikusy
raikusy / devops_best_practices.md
Created April 22, 2021 22:59 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud

const axios = require('axios');
const url = 'http://todorestapi.test'
function ContactsList(props) {
const [contactList, setcontactList] = useState([]);
const init = async () => {
const response = await fetch(url + '/api/contact/all');
const json = await response.json()
console.log(json);