Skip to content

Instantly share code, notes, and snippets.

@cayter
cayter / LICENSE
Last active May 16, 2025 03:50
Drizzle ORM Type-Safe Repository With PgTable
MIT License
Copyright (c) 2022-present, cayter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@HugeLetters
HugeLetters / example.ts
Created April 8, 2024 14:59
Drizzle ORM SQLite Trigger migrations
// has to be exported - triggers should be stored in the same folder as table schemas
export const insertTrigger = new Trigger({
name: "update_product_meta_on_new_review",
type: "INSERT",
on: review,
when: ({ newRow }) => eq(newRow.isPrivate, false),
do: ({ newRow }) =>
db
.insert(productMeta)
.values({
@lokimeyburg
lokimeyburg / pm-interview-questions.md
Last active May 11, 2025 07:10
Product Manager Interview Questions

Product Manager Interview Questions

General Questions:

  • Tell me about yourself.
  • Tell me about the most boring job you have ever had.
  • What changes would you make if you came on board?
  • What would you say to your boss if he is crazy about an idea, but you think it stinks?
  • Assuming that you are selected, what will be your strategy for next 60 days?
  • why are not you earning more money at this stage of your career?
@daffl
daffl / readme.md
Last active November 26, 2017 20:48
Upgrading to Feathers v3 (Buzzard)
@davidbauer
davidbauer / gist:11055010
Created April 18, 2014 17:22
Python script to download images from a CSV of image urls
#!/usr/bin/env python
# assuming a csv file with a name in column 0 and the image url in column 1
import urllib
filename = "images"
# open file to read
with open("{0}.csv".format(filename), 'r') as csvfile: