Skip to content

Instantly share code, notes, and snippets.

View BoQsc's full-sized avatar
💭
I may be slow to respond.

Feldwor BoQsc

💭
I may be slow to respond.
  • Public Domain
  • Baltic States
  • 11:05 (UTC +02:00)
View GitHub Profile
@BoQsc
BoQsc / gist:be2034af19b0d10da3d037ddf5f4e878
Created March 28, 2023 20:28
Screenshot example in javascript clientside
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Screenshot Demo</title>
<style>
#v,
#i {
width: 1920px;
height: 1080px;
@BoQsc
BoQsc / chatgpt-on-your-computer.md
Last active March 27, 2023 08:30
Open Source and free. Locally run 7B "ChatGPT" model named Alpaca-LoRA on your computer. A 7 Billions parameter model on your laptop.

Locally run 7B "ChatGPT" model named Alpaca-LoRA on your computer.

  1. Download 7B model alpaca model.
  2. Download client-side program for Windows, Linux or Mac
  3. Extract alpaca-win.zip
  4. Copy the previously downloaded ggml-alpaca-7b-q4.bin file into newly extracted alpaca-win folder
  5. Open command prompt and run chat.exe
  6. Type questions you would want to ask an Alpaca.

Customize: chat --threads 4 --n_predict 512 --ctx_size 2048
Help: for more options. chat --help

@BoQsc
BoQsc / download_revolt_server.py
Last active May 15, 2023 20:52
Download revolt.chat server.
import json
import os
import requests
from dotenv import load_dotenv
def main():
load_dotenv()
TOKEN = 'rxPrvEqnIZZfZ4JO9Lu4dHf-bBhd_29CGKzWnaJeWKl71f01W_EMrV6lA_2aXsO'
SERVER_ID = '0sGJ0CVBeZV2HwYAq3S6ZKrN4N'
BASE_URL = 'https://api.revolt.chat'
@BoQsc
BoQsc / print.c
Last active February 25, 2023 17:04
Output library: A wrapper around printf of C Standard Library for logging and clarity.
/* A wrapper library for printf function.*/
/* At the core: vfprintf instead of printf is used to allow streams and variadic arguments */
/* Print is also extended into helper functions error() warning() notice() info() */
#include <stdio.h>
#include <stdarg.h>
// gcc -Wall -Wextra -Q print.c && a
// Stream: Error, custom, warning, notice, log, file
@BoQsc
BoQsc / formatandinstalliso.cmd
Last active February 20, 2023 13:28
Format USB and install Linux ISO on Windows 10 automated way
@ECHO OFF
:wait_for_usb
TITLE Waiting for USB
FOR /f %%D IN ('wmic LogicalDisk get Caption^, VolumeName ^| find "LINUXUSB"') DO SET "DRIVE=%%D"
IF "%DRIVE%"=="" TIMEOUT /T 2 && CLS && GOTO :wait_for_usb
TITLE Formatting USB
@BoQsc
BoQsc / extractisofile.batch
Created February 20, 2023 12:28
Extract .iso file using tar
tar xfv linuxmint-21.1-xfce-64bit.iso
@BoQsc
BoQsc / open bluetooth connection using explorer.md
Created February 8, 2023 11:11
open bluetooth connection using explorer

%windir%\explorer.exe ms-settings-connectabledevices:devicediscovery

image

tt.1.mp4
@ECHO OFF
:repeat_run
IF EXIST "./gnirehtet-rust-win64/adb.exe" IF EXIST "./gnirehtet-rust-win64/gnirehtet.exe" GOTO :Start
TITLE Downloading gnirehtet-rust-win64
curl -L "https://github.com/Genymobile/gnirehtet/releases/download/v2.5/gnirehtet-rust-win64-v2.5.zip" -O
TITLE Extracting gnirehtet-rust-win64
@BoQsc
BoQsc / is-your-Facebook-confirmation-code.md
Last active December 30, 2022 09:50
FB-95216 is your Facebook confirmation code. No you have not been hacked.

FB-12345 is your Facebook confirmation code.

No you have not been hacked.

1. Someone entered your email address into Forgot password.

2. And selected: Send Code via SMS.

image

If you are getting this SMS message sent to your phone, that means that someone clicked Forgot Password on the Facebook.com entry page, entered your email into it and Proceeded with Send Code via SMS.

@BoQsc
BoQsc / codepage-tester-cmd
Last active December 29, 2022 18:31
Windows Command Prompt Codepage tester
@ECHO OFF
SETLOCAL EnableDelayedExpansion
FOR /L %%i IN (1,1,65001) DO (
chcp %%i >nul 2>nul
TITLE %%i
IF "!ERRORLEVEL!"=="0" (
echo %%i !ERRORLEVEL!