Skip to content

Instantly share code, notes, and snippets.

View JosephScript's full-sized avatar
💭
🚀 Changed my handle to @JosephScript!

Joseph A. Szczesniak JosephScript

💭
🚀 Changed my handle to @JosephScript!
View GitHub Profile
@JosephScript
JosephScript / biome.json
Created March 4, 2026 14:29
Default biome settings
{
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
@JosephScript
JosephScript / current-theme.conf
Created March 4, 2026 12:38
tokyo night kitty theme
# vim:ft=kitty
## name: Tokyo Night
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf
background #1a1b26
foreground #c0caf5
@JosephScript
JosephScript / kitty.conf
Created March 3, 2026 19:03
~/.config/kitty/kitty.conf
# BEGIN_KITTY_THEME
# Tokyo Night
include current-theme.conf
# END_KITTY_THEME
# Set the shell to zsh
shell /usr/bin/zsh
# Enable splits layout
enabled_layouts splits
@JosephScript
JosephScript / generateEditorJson.ts
Created July 26, 2024 19:23
CraftJS generateEditorJson with only JSON
import { ROOT_NODE, UserComponent } from '@craftjs/core'
import { getRandomId } from '@craftjs/utils'
// We can infer the NodeConfig type from the UserComponent's props
type NodeConfig<T extends UserComponent> = {
node: T
props: React.ComponentProps<T>
}
@JosephScript
JosephScript / server.ts
Created March 8, 2024 16:46
fastify-hocuspocus
import { Server } from '@hocuspocus/server'
import Fastify from 'fastify'
import WebSocketPlugin from 'fastify-websocket'
const port = Number(process.env.PORT || 8800)
const host = '0.0.0.0'
// Initialize Fastify
const fastify = Fastify()
@JosephScript
JosephScript / Animate.tsx
Created March 20, 2020 18:17
An easy way to use CSS transitions in React to animate a child element in and out
import React, { FC, useEffect, useState, ReactNode } from 'react'
import styled from '@emotion/styled'
const FadeInAndOut = styled.p`
transition: opacity 0.5s;
opacity: 0;
&.fadeIn {
opacity: 1;
}
`
@JosephScript
JosephScript / nlp.txt
Created December 13, 2019 15:34
NLP example
Example Text: It’s what Chrome is a programming using AngularJS is a lightweight jQuery clone, without leaving the desired DOM in software modules, defined by modular programming, in a Web browsers perform just-in-time compilation Native development. Facebook for a creational pattern was engineered as an API for library/framework free JavaScript is a way to post status updates without leaving the intermediate to help run multiple versions of documents BEM is the current JavaScript. Apache Cordova is a project. Wide Web analytics, ad tracking, personalization or submitting data. Edge browser. Redux is ECMAScript 2015 / ES6 code can run both in Java. HTTP requests. XMLHttpRequest is a JavaScript code linter. JSPM is a structural framework for transferring data flow. SpiderMonkey, is the host environment for many frameworks in the performance limitations inherent to act as individual documentations, but more responsive. Virtual DOM is a library for building interactive 3D content for information about the result
#!/bin/bash
# homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# fonts
brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font
mkdir -p ~/Source
@JosephScript
JosephScript / mail.js
Created June 15, 2018 16:46
Mailgun Zeit Micro Nodejs
const {buffer, text, json} = require('micro')
const Mailgun = require('mailgun-js')
const mailgun = new Mailgun({apiKey: 'api_key', domain: 'domain'})
module.exports = async (req, res) => {
const js = await json(req)
const data = {
from: js.from,
to: 'contact@upsie.com',
subject: 'Hello from Mailgun',
@JosephScript
JosephScript / talent_create_tables_data.sql
Created January 25, 2016 17:18
Example of a one-to-one, one-to-many, and a many-to-many relationship using PostgreSQL
/** ---------- TALENT ---------- **/
DROP TABLE IF EXISTS talent CASCADE;
CREATE TABLE talent (
talent_id serial PRIMARY KEY,
first_name text,
last_name text,
phone text,
created_at timestamp,
updated_at timestamp