Skip to content

Instantly share code, notes, and snippets.

View ceifa's full-sized avatar
🦆
quack quack

Gabriel Francisco ceifa

🦆
quack quack
View GitHub Profile
@ceifa
ceifa / Memory.cs
Created January 30, 2020 20:46
A perfect memory class
public class Memory
{
private const int ProcessVmOperation = 0x0008;
private const int ProcessVmRead = 0x0010;
private const int ProcessVmWrite = 0x0020;
private readonly Process _process;
private readonly IntPtr _processHandle;
private int _discard;
@ceifa
ceifa / ceifa.cfg
Last active May 3, 2024 12:56
My CS:GO config
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot12"
bind "a" "+left"
bind "b" "buymenu"
@ceifa
ceifa / settings.json
Last active February 22, 2022 01:14
Windows terminal settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "switchToTab",
"index": 7
},
--[[---------------------------------------------------------
Promise object definition
-----------------------------------------------------------]]
local PENDING = 0
local RESOLVED = 1
local REJECTED = -1
local Promise = {}
Promise.__index = Promise
function Promise:_New(callback)
@ceifa
ceifa / filesystem.lua
Last active March 17, 2021 23:23
a poor coded and not tested virtual filesystem made by me, but can be useful in future
__DANGER_filesystem = {}
file = {}
function file.exists(path)
for filek, filev in ipairs(__DANGER_filesystem) do
if string.find(filev.path, path, 0, true) then return true end
end
return false
end
@ceifa
ceifa / web-qa.js
Created April 12, 2023 20:16
openai web-qa node.js
import axios from 'axios';
import { load } from 'cheerio';
import fs from 'node:fs';
import { setTimeout } from 'node:timers/promises';
import { createObjectCsvWriter } from 'csv-writer'
import tiktoken from 'tiktoken-node'
import { OpenAIApi, Configuration } from 'openai'
import distance from 'compute-cosine-distance';
const domain = ''
import axios from 'axios'
import auth from './auth.json' assert { type: "json" }
import * as uuid from 'uuid'
import qr from 'qrcode-terminal'
import fs from 'node:fs/promises'
import { setTimeout } from 'node:timers/promises'
const randomuuid = uuid.v4()
console.log('QR Code ID:', randomuuid)