Skip to content

Instantly share code, notes, and snippets.

View sacsbrainz's full-sized avatar
🎯
Focusing

Solomon ogu sacsbrainz

🎯
Focusing
View GitHub Profile
@sacsbrainz
sacsbrainz / fix_git.md
Last active August 30, 2023 18:55
Git not picking up changes correctly after copy or os change

run this command to see you old and new mode also look out for the last 3 numbers as this represents the permissions

git diff -G.

so after this we can see the issue, our permissions changed

to fix this they are 2 ways

  1. run this command in the root directory of your project and it will fix the permissions

find . -type f -exec chmod a-x {} \;

@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 (?, ?)',