Skip to content

Instantly share code, notes, and snippets.

@sgdan
sgdan / gzip.kts
Last active January 7, 2025 15:26
Kotlin code to compress/uncompress a string with gzip
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.charset.StandardCharsets.UTF_8
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream
fun gzip(content: String): ByteArray {
val bos = ByteArrayOutputStream()
GZIPOutputStream(bos).bufferedWriter(UTF_8).use { it.write(content) }
return bos.toByteArray()
@darekkay
darekkay / trakt-backup.php
Last active January 7, 2025 15:23
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 7, 2025 15:22
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@camillanapoles
camillanapoles / auto_git_query
Created January 7, 2025 15:10 — forked from nullenc0de/auto_git_query
Automated Github Queries (Can open 29 tabs at a time)
https://github.com/search?q=BROWSER_STACK_ACCESS_KEY= OR BROWSER_STACK_USERNAME= OR browserConnectionEnabled= OR BROWSERSTACK_ACCESS_KEY=&s=indexed&type=Code
https://github.com/search?q=CHROME_CLIENT_SECRET= OR CHROME_EXTENSION_ID= OR CHROME_REFRESH_TOKEN= OR CI_DEPLOY_PASSWORD= OR CI_DEPLOY_USER=&s=indexed&type=Code
https://github.com/search?q=CLOUDAMQP_URL= OR CLOUDANT_APPLIANCE_DATABASE= OR CLOUDANT_ARCHIVED_DATABASE= OR CLOUDANT_AUDITED_DATABASE=&s=indexed&type=Code
https://github.com/search?q=CLOUDANT_ORDER_DATABASE= OR CLOUDANT_PARSED_DATABASE= OR CLOUDANT_PASSWORD= OR CLOUDANT_PROCESSED_DATABASE=&s=indexed&type=Code
https://github.com/search?q=CONTENTFUL_PHP_MANAGEMENT_TEST_TOKEN= OR CONTENTFUL_TEST_ORG_CMA_TOKEN= OR CONTENTFUL_V2_ACCESS_TOKEN=&s=indexed&type=Code
https://github.com/search?q=-DSELION_BROWSER_RUN_HEADLESS= OR -DSELION_DOWNLOAD_DEPENDENCIES= OR -DSELION_SELENIUM_RUN_LOCALLY=&s=indexed&type=Code
https://github.com/search?q=ELASTICSEARCH_PASSWORD= OR ELASTICSEARCH_USERNAME= OR EMAIL_NOTIFI
Year Population Murder Rape Robbery Assault Burglary CarTheft
1965 18073000 836 2320 28182 27464 183443 58452
1966 18258000 882 2439 30098 29142 196127 64368
1967 18336000 996 2665 40202 31261 219157 83775
1968 18113000 1185 2527 59857 34946 250918 104877
1969 18321000 1324 2902 64754 36890 248477 115400
1970 18190740 1444 2875 81149 39145 267474 125674
1971 18391000 1823 3225 97682 42318 273704 127658
1972 18366000 2026 4199 86391 45926 239886 105081
1973 18265000 2040 4852 80795 47781 246246 112328
@adibhanna
adibhanna / config
Created December 28, 2024 18:16
Ghostty config
font-family = BerkeleyMono Nerd Font
#font-family = Iosevka Nerd Font
# font-family = SFMono Nerd Font
font-size = 20
theme = GruvboxDarkHard
shell-integration-features = no-cursor,sudo,no-title
cursor-style = block
adjust-cell-height = 35%
# background-opacity = 0.96