Skip to content

Instantly share code, notes, and snippets.

View cayter's full-sized avatar
🎯
Focusing

cayter cayter

🎯
Focusing
View GitHub Profile
@cayter
cayter / LICENSE
Last active April 4, 2025 15:10
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:
@cayter
cayter / index.cjs
Created July 13, 2023 12:41
drizzle-kit
This file has been truncated, but you can view the full file.
#!/usr/bin/env node
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
@cayter
cayter / main.go
Last active July 12, 2020 10:47
Rapyd's Go Example
package main
import (
"bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"fmt"
"io/ioutil"
@cayter
cayter / rapyd.js
Created March 17, 2020 13:46
Rapyd API - NodeJS 12.x Example
const https = require("https");
const crypto = require("crypto");
const accessKey = "<YOUR_RAPYD_ACCESS_KEY>";
const secretKey = "<YOUR_RAPYD_SECRET_KEY>";
const salt = crypto.randomBytes(12).toString("hex");
const timestamp = (Math.floor(new Date().getTime() / 1000) - 10).toString();
const method = "post";
const path = "/v1/payments";
const body = JSON.stringify({
@cayter
cayter / rapyd.mjs
Created March 17, 2020 13:44
Rapyd API - NodeJS 13.x Example
import https from "https";
import crypto from "crypto";
const accessKey = "<YOUR_RAPYD_ACCESS_KEY>";
const secretKey = "<YOUR_RAPYD_SECRET_KEY>";
const salt = crypto.randomBytes(12).toString("hex");
const timestamp = (Math.floor(new Date().getTime() / 1000) - 10).toString();
const method = "post";
const path = "/v1/payments";
const body = JSON.stringify({