Skip to content

Instantly share code, notes, and snippets.

@cayter
cayter / repository.ts
Last active April 18, 2024 08:48
Drizzle ORM Type-Safe Repository With PgTable
import { startSpan } from "@sentry/remix";
import type { StartSpanOptions } from "@sentry/types";
import {
type AnyColumn,
type AnyTable,
type BuildQueryResult,
type DBQueryConfig,
type DrizzleTypeError,
type Equal,
type ExtractTablesWithRelations,
@Aha00a
Aha00a / jquery-release-notes.md
Last active April 18, 2024 08:48 — forked from arcdev/jquery-release-notes.md
jQuery Release Notes
@BlockmanCodes
BlockmanCodes / 01_deployContracts.js
Created May 5, 2023 01:17
Uniswap V2 & SushiSwap: Swap Tokens
const {
Contract, ContractFactory, utils, constants,
} = require("ethers")
const WETH9 = require("../WETH9.json")
const factoryArtifact = require('@uniswap/v2-core/build/UniswapV2Factory.json')
const routerArtifact = require('@uniswap/v2-periphery/build/UniswapV2Router02.json')
const pairArtifact = require('@uniswap/v2-periphery/build/IUniswapV2Pair.json')
@xel1045
xel1045 / asterisk-cli-example.php
Created August 20, 2013 21:19
Helper class for Asterisk API interface
$hostname = 'voip.domain.com';
$username = 'username';
$secret = '*****';
try {
$cli = AsteriskCLI::factory($hostname)
->Login($username, $secret);
//$response = $cli->receive('ListCommands');
$response = $cli->receive('SIPshowpeer', array(
@sebjai
sebjai / short_term_alpha.ipynb
Last active April 18, 2024 08:44
Market Making in Short-Term Alpha (Chapter 10.4.2 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, Penalva, published by Cambridge University Press)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@merikan
merikan / Jenkinsfile
Last active April 18, 2024 08:44
Some Jenkinsfile examples
Some Jenkinsfile examples
@rjha
rjha / nginx-503.conf
Created June 17, 2012 06:35
Nginx configuration for 503 custom maintenance page
server {
listen 80;
# default catch-all domain
server_name _ ;
error_page 503 @503 ;
#return 503 ;
root /var/www/htdocs/ ;
@wch
wch / app.R
Last active April 18, 2024 08:42
Example Shiny app that automatically installs a source package when deployed to shinyapps.io
# By default, the directories in .libPaths() aren't writable on shinyapps.io, so
# create a subdir where we'll install our package.
if (!file.exists("R-lib")) {
dir.create("R-lib")
}
# Unfortunately, there's no way to get deployapp() to ignore this directory, so
# make sure to remove it locally before you call deployapp(). This can be done
# with:
# unlink("pkgInst/R-lib", recursive = TRUE)
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 18, 2024 08:41
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@riceooks
riceooks / cert.conf
Last active April 18, 2024 08:39
SSL Generate for Windows
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]