Skip to content

Instantly share code, notes, and snippets.

@alirizwan
alirizwan / GPT.ts
Last active September 6, 2025 00:32
Code GPT
import {
AxiosError,
AxiosHeaders,
type AxiosRequestConfig,
type AxiosResponse,
type RawAxiosRequestHeaders,
} from "axios";
/* ---------- helpers ---------- */
const MASK = "******";
@alirizwan
alirizwan / rules.txy
Created November 4, 2024 16:41
Rules
INSERT INTO `Rules` (`id`, `name`, `key`, `ruleOptions`, `isActive`, `createdAt`, `updatedAt`, `deletedAt`, `ruleId`) VALUES (1, 'PPE', NULL, NULL, 1, '2024-04-25 00:00:00', '2024-04-25 00:00:00', NULL, NULL);
INSERT INTO `Rules` (`id`, `name`, `key`, `ruleOptions`, `isActive`, `createdAt`, `updatedAt`, `deletedAt`, `ruleId`) VALUES (2, 'Hard Hat', '0002', '[{"type": "select", "title": "Colour", "options": ["#FF0000", "#FFFF00", "#00FF00", "#0000FF"], "dropdown": false, "required": true}]', 1, '2024-04-25 00:00:00', '2024-04-25 00:00:00', NULL, 1);
INSERT INTO `Rules` (`id`, `name`, `key`, `ruleOptions`, `isActive`, `createdAt`, `updatedAt`, `deletedAt`, `ruleId`) VALUES (3, 'Hi Vis Vest', '0003', '[{"type": "select", "title": "Colour", "options": ["#FF0000", "#FFFF00", "#00FF00", "#0000FF"], "dropdown": false, "required": true}]', 1, '2024-04-25 00:00:00', '2024-04-25 00:00:00', NULL, 1);
INSERT INTO `Rules` (`id`, `name`, `key`, `ruleOptions`, `isActive`, `createdAt`, `updatedAt`, `deletedAt`, `ruleId`) VAL
# This xorg configuration file will start a dummy X11 server.
# move it to /etc/X11/xorg.conf
# don't forget apt install xserver-xorg-video-dummy;
# based on https://xpra.org/Xdummy.html
Section "ServerFlags"
Option "DontVTSwitch" "true"
Option "AllowMouseOpenFail" "true"
Option "PciForceNone" "true"
Option "AutoEnableDevices" "false"
# This xorg configuration file will start a dummy X11 server.
# move it to /etc/X11/xorg.conf
# don't forget apt install xserver-xorg-video-dummy;
# based on https://xpra.org/Xdummy.html
Section "ServerFlags"
Option "DontVTSwitch" "true"
Option "AllowMouseOpenFail" "true"
Option "PciForceNone" "true"
Option "AutoEnableDevices" "false"
absl-py>=2.0.0
debugpy>=1.8.0
decorator>=5.1.1
matplotlib>=3.8.2
numpy>=1.26.2
oauthlib>=3.2.2
opencv-python>=4.7.0.72
packaging>=23.2
Pillow>=9.0.1
python-dateutil>=2.8.2
@alirizwan
alirizwan / index.js
Last active November 2, 2022 12:46
Ex
/*
* The Time Traveling Hash Table
* =============================
*
* When dealing with a normal hash table, if you query a key before it has been set,
* you'll get nothing back, and when querying a key after it has been set, you'll get
* that value back. If you set the value again and then get it again, you'll get the
* new value and not the old value.
*
* The Time Traveling Hash Table works the same way, except you can also set the time
@alirizwan
alirizwan / 15puzzle.html
Last active January 26, 2017 22:09
15 Puzzle
<html>
<style>
.cell {
background-color: #CCF;
height: 24px;
width: 24px;
text-align: center;
}
{"files":[{"filetype":"image/jpeg","filename":"0-sa-d2-29680360340071ff1dc32cf5516fc8e7.jpg","filesize":40732,"base64":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAMtAn0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD6oooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKK
@alirizwan
alirizwan / gist:405d51b266529720791da85b4f681b42
Created August 21, 2016 22:12
Usman Doc for Nakama Inc.
[x][CLOCKS] Date range filter
[x][COMPANY] create UI for View usecase & incorporate CSS changes
[x][COMPANY] add Edit support for a specific company [WAS WORKING]
[x][COMPANY] New company support [THE API IS GIVEN /companies/:id/client [POST]]
[x][COMPANY] Archiving support [/companies/:id/client/:clientCompanyId [DELETE]] [/companies?archived=1, this will return all archived companies] [Reverting an Archived company: /companies/:id/clients/:clientCompanyId/revert [PATCH]]
// August 22 - 4am
[_][PEOPLE] ALL Above for People [/users [GET] This is already given in the other google docs, please refer to that document.]
[_][SERVICES] ALL Above for Services [/services This is already given in the other google docs, please refer to that document.]