Skip to content

Instantly share code, notes, and snippets.

View rajinwonderland's full-sized avatar
🛰️
Exploring

Raj K Singh rajinwonderland

🛰️
Exploring
View GitHub Profile
@ItsWendell
ItsWendell / geometryType.ts
Created October 21, 2023 15:23
Experimental / hacky custom drizzle column for PostGIS geometry (injection method)
export type GeometryTypes = {
Point: GeoJSON.Point;
LineString: GeoJSON.LineString;
Polygon: GeoJSON.Polygon;
MultiPoint: GeoJSON.MultiPoint;
MultiLineString: GeoJSON.MultiLineString;
MultiPolygon: GeoJSON.MultiPolygon;
GeometryCollection: GeoJSON.GeometryCollection;
};
@lawrencecchen
lawrencecchen / $.ts
Last active April 11, 2024 04:23
next-auth with remix
// app/routes/api/auth/$.ts
import NextAuth from "~/lib/next-auth/index.server";
export const { action, loader } = NextAuth({
providers: [
GoogleProvider({
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_CLIENT_SECRET,
}),
],
@kelset
kelset / 2018-2022 RN retrospective.md
Last active July 26, 2022 05:11
A personal retrospective of being a maintainer for React Native for the past 4 years.

4 years as a React Native OSS maintainer: a retrospective

Why writing this, and why now? In January 2018 I started my journey as a maintainer of the React Native (RN) open source repo — it is the longest role I’ve ever kept going in my professional career, in a way — and I think now, at the 4 years mark, it is a very good time for me to pause, and force myself to think about how things have changed since then.

How did I become a maintainer? After a big burnout with react-navigation that led me to learn how to correctly interact with Open Source Software (OSS), I was starting to interact with OSS again by being a good citizen in the RN repository. Seeing me constantly in the issue section, trying to help out, led some Facebook (FB) engineers to decide to ask me to join the OSS repo with write access, so that I could be more proactive in helping its maintenance… and here we are.

Even so, I was never an em

@WangHansen
WangHansen / userschema.ts
Last active October 14, 2022 18:40
Convert Mongoose js to ts
import { Document, Model, model, Types, Schema, Query } from "mongoose"
import { Company } from "./Company"
// Schema
const UserSchema = Schema<UserDocument, UserModel>({
firstName: {
type: String,
required: true
},
lastName: String,
@ertanhasani
ertanhasani / LinkSmoothScroll.js
Last active May 22, 2021 18:39 — forked from vinaypuppal/LinkSmoothScroll.js
Next.js smooth scrolling
import React, { Children } from 'react'
import Router from 'next/router'
import smoothScroll from '../utils/smoothScroll'
// this HOC is taken from https://github.com/zeit/next.js/blob/master/lib/link.js and modified
export default class LinkSmoothScroll extends React.Component {
constructor (props) {
super(props)
this.linkClicked = this.linkClicked.bind(this)
}
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 5, 2024 10:30
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@vinaypuppal
vinaypuppal / LinkSmoothScroll.js
Last active March 17, 2022 19:10
Next.js smooth scroll
import React, { Children } from 'react'
import Router from 'next/router'
import smoothScroll from '../utils/smoothScroll'
// this HOC is taken from https://github.com/zeit/next.js/blob/master/lib/link.js and modified
export default class LinkSmoothScroll extends React.Component {
constructor (props) {
super(props)
this.linkClicked = this.linkClicked.bind(this)
}
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active April 27, 2024 22:46
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.