Skip to content

Instantly share code, notes, and snippets.

View tchief's full-sized avatar
🇺🇦

Sergii Golyshev tchief

🇺🇦
View GitHub Profile
@sergeyk
sergeyk / claude_code_prompts_and_tools.yaml
Last active October 12, 2025 20:29
Claude Code System Prompt and Tool Descriptions
model: claude-opus-4-20250514
messages:
- role: user
content:
- type: text
text: |
<system-reminder>
As you answer the user's questions, you can use the following context:
# important-instruction-reminders
Do what has been asked; nothing more, nothing less.
@czottmann
czottmann / . ̸island ̸StoreUsingComponent1.tsx
Last active December 15, 2023 20:41
Deno + Statery example
/** @jsx h */
import { h } from "preact";
import { incrementCount, state } from "../stores/whatever_store.ts";
export default function StoreUsingComponent1() {
const { counter } = state();
return (
<p>
<button onClick={incrementCount}>
@darconeous
darconeous / rect-starlink-cable-hack.md
Last active May 29, 2025 16:43
Hacking the Rectangular Starlink Dishy Cable
@jeremyadamsfisher
jeremyadamsfisher / wikiart_rudalle_fine_tuniing_prep.py
Last active August 18, 2022 05:39
WikiArt ETL for fine-tuning RuDALLE
"""convert the WikiArt dataset to a CSV suitable for finetuning with https://colab.research.google.com/drive/1Tb7J4PvvegWOybPfUubl5O7m5I24CBg5?usp=sharing#scrollTo=dGPS3HnDN3wO
"""
import pandas as pd
from googletrans import Translator
from tqdm import tqdm
! wget http://web.fsktm.um.edu.my/~cschan/source/ICIP2017/wikiart_csv.zip
! mkdir wikiart_csv \
&& cd wikiart_csv \
@solace
solace / rule.js
Last active May 7, 2022 15:48 — forked from vktr/rule.js
Auth0 Rule: Add Stripe Customer Id to existing token data
// If you have multiple rules in your workflow that need to update token data.
function (user, context, callback) {
user.app_metadata = user.app_metadata || {};
const token_namespace = 'https://your-domain.com/app_metadata';
// assumes your metadata object is shallow
const addCustomerId = stripe_customer_id => ({
...context.idToken[token_namespace],
@anshulxyz
anshulxyz / rule.js
Last active May 7, 2022 15:48 — forked from vktr/rule.js
Add Stripe Customer Id to Auth0 user's metadata, and Auth0 id to Stripe Customer's metadata via custom rule
function (user, context, callback) {
user.app_metadata = user.app_metadata || {};
// Checking if the Auth0 User already has a stripe customer id with it's metadata
if ('stripe_customer_id' in user.app_metadata) {
console.log(user);
return callback(null, user, context);
}
var stripe = require('stripe')('sk_test_tyd8...');
@kurtharriger
kurtharriger / types.d.ts
Last active December 31, 2022 16:34
Inferred Workflowy API
type ProjectId = string; // eg: 2a13b3e1-7a74-3b2b-9758-1b398845a8e8
type UserId = number;
type ShareId = string;
type ClientId = string;
// login
// response sessionid returned in set-cookie
// curl -X POST https://workflowy.com/accounts/login/ -F 'username=<username>' -F'password=<password>' -H 'accept: application/json' -D -
export interface LoginFormData {
username: string;
# Updated/fixed version from Gene Kogan's "machine learning for artists" collection - ml4a.github.io
import time
import os
import re
import random
import argparse
import urllib.request
import itertools
import bs4
@gaearon
gaearon / modern_js.md
Last active September 27, 2025 02:50
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created