Skip to content

Instantly share code, notes, and snippets.

View aluxian's full-sized avatar

Alexandru Rosianu aluxian

View GitHub Profile

Full prompt:
You are ChatGPT, a large language model trained by OpenAI. Knowledge cutoff: 2024-06 Current date: XX

Image input capabilities: Enabled

You are ChatGPT's agent mode. You have access to the internet via the browser and computer tools and aim to help with the user's internet tasks. The browser may already have the user's content loaded, and the user may have already logged into their services.

Financial activities

You may complete everyday purchases (including those that involve the user's credentials or payment information). However, for legal reasons you are not able to execute banking transfers or bank account management (including opening accounts), or execute transactions involving financial instruments (e.g. stocks). Providing information is allowed. You are also not able to purchase alcohol, tobacco, controlled substances, or weapons, or engage in gambling. Prescription medication is allowed.

@hanxiao
hanxiao / testRegex.js
Last active August 10, 2025 07:40
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@adtac
adtac / Dockerfile
Last active July 13, 2025 20:06
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@greird
greird / slack-files-downloader.sh
Last active August 1, 2025 16:44
Download all files from a Slack workspace export folder.
#!/bin/bash
#
# This script will browse a Slack export folder and download all files in a new /export folder
#
# HOW TO:
# 1. As a Workspace admin, download an export of your Slack history (https://www.slack.com/services/export)
# 2. Make sure you have jq installed (https://stedolan.github.io/jq/)
# 3. Place this file at the root of your Slack export folder, next to channels.json
# 4. Run `bash slack-files-downloader.sh` in your terminal
#
// ==UserScript==
// @name Disable YouTube playlists
// @description Remove playlist part from watched videos
// @namespace https://gist.github.com/Maxr1998/f07175ad05ed5c783da9b98bceee61a6
// @downloadURL https://gist.github.com/Maxr1998/f07175ad05ed5c783da9b98bceee61a6/raw/2b47f9d7949f95b1b6e50f3be79d49ac48f95af7/disable_youtube_playlists.user.js
// @updateURL https://gist.github.com/Maxr1998/f07175ad05ed5c783da9b98bceee61a6/raw/2b47f9d7949f95b1b6e50f3be79d49ac48f95af7/disable_youtube_playlists.user.js
// @author Maxr1998
// @version 0.1.1
// @match *://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
@patro85
patro85 / JWT Decode.sh
Last active June 19, 2022 15:46
A BBEdit Text Filter script to take textual input and produce decode of JWT tokens.
#!/bin/bash
#
# JWT Decode
# https://gist.github.com/patro85/2a76d16181730989b9b9af6a7ca6cd1e
#
# A BBEdit Text Filter script to take textual input and produce decode of JWT tokens.
# Note: Signature section is ignored. Meant to be used in conjunction with a separate JSON
# formatter.
#
# Installation instructions: Place this file in BBEdit's "Text Filters" folder inside of
@Wallacy
Wallacy / apollo.ts
Last active January 29, 2023 16:33
Apollo Server + Cloudflare Workers
import { ApolloServerBase, Config, gql } from 'apollo-server-core'
export class ApolloServer extends ApolloServerBase {
protected override serverlessFramework(): boolean {
return true
}
public async createHandler() {
await this.ensureStarted()
return async (request: Request) => {
@evanreichard
evanreichard / pwa-everything.user.js
Created January 1, 2022 21:28
pwa-everything.user.js
// ==UserScript==
// @name PWA Everything
// @author Evan Reichard
// @version 0.0.1
// @match *://*/*
// @grant none
// @run-at document-idle
// @noframes
// ==/UserScript==
@StarLard
StarLard / DetentSheet.swift
Last active March 11, 2025 04:44
A simple implementation of an UISheetPresentationController wrapper using SwiftUI
//
// DetentSheet.swift
// StarLardKit
//
// Created by Caleb Friden on 9/28/21.
//
import SwiftUI
// MARK: - Public
@jonatas
jonatas / hypertable_trigger.sql
Last active January 24, 2022 08:36
Timescale continuous aggregates over top of continuous aggregates - Caggs over top of caggs (POC)
DROP TABLE ticks CASCADE;
DROP TABLE ohlc_1s CASCADE;
CREATE TABLE ticks ( time TIMESTAMP NOT NULL, symbol varchar, price decimal, volume int);
CREATE TABLE ohlc_1s ( time TIMESTAMP NOT NULL, symbol varchar, o decimal, h decimal, l decimal, c decimal, v int);
SELECT create_hypertable('ticks', 'time');
SELECT create_hypertable('ohlc_1s', 'time');
CREATE OR REPLACE FUNCTION feed_ohlc_1s() RETURNS trigger AS
$BODY$
DECLARE