Skip to content

Instantly share code, notes, and snippets.

View sacsbrainz's full-sized avatar
💻
Typescript

Solomon ogu sacsbrainz

💻
Typescript
View GitHub Profile
@sacsbrainz
sacsbrainz / configuration.nix
Created July 26, 2023 05:47
my configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{
config,
pkgs,
lib,
...
}: {
imports = [
signUp: publicProcedure
.input(registerSchema)
.mutation(async ({ input, ctx }) => {
const transformedPhoneNumber = input.phoneNumber.replace(/^0/, "+234");
// check if user exists
const exists = await ctx.prisma.user.findUnique({
where: {
email: input.email,
},
import telebot
import sqlite3
import time
# DATABASE CONFIGURATION
conn = sqlite3.connect('sacs_db.db', check_same_thread=False)
cursor = conn.cursor()
def db_wallet(user_id: int, wallet_a: str):
cursor.execute('INSERT INTO user_db (user_id, wallet) VALUES (?, ?)',