This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name PWA Everything | |
// @author Evan Reichard | |
// @version 0.0.1 | |
// @match *://*/* | |
// @grant none | |
// @run-at document-idle | |
// @noframes | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DetentSheet.swift | |
// StarLardKit | |
// | |
// Created by Caleb Friden on 9/28/21. | |
// | |
import SwiftUI | |
// MARK: - Public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
IPADDR=`ifconfig eth0 | grep 'inet ' | awk '{print $2}'` | |
IP6ADDR=`ifconfig eth0 | grep 'inet6 ' | awk '{print $2}' | grep -v '^f'` | |
DFROUTE=`route -n | grep '^0.0.0.0' | awk '{print $2}'` | |
DF6ROUTE="fe80::1" | |
IPSUB="27" | |
IP6SUB="64" | |
WORKDIR=`mktemp -d` | |
cd $WORKDIR |
NewerOlder