Skip to content

Instantly share code, notes, and snippets.

@dentropy
dentropy / README.md
Created June 22, 2024 06:03 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
Transcript for [Tim Ferriss On Solving Problems With People And Using Stoicism To Make Better Decisions](https://www.youtube.com/watch?v=nnw5BdPfPWs) by [Merlin](https://merlin.foyer.work/)
stoicism helps you to conserve and best
deploy your limited resources it's out
of your control trying to allocate as
few calories as few minutes as few
dollars to that as humanly
possible you know all this is your fault
right because so so I had this crazy
idea Samantha and I had this crazy idea

your mind is still soft it's hard for me to respect people who are able to come in to that world and leave this is aing lifestyle man and people wonder why am I not achieving more and we wonder why don't I have Drive anymore where's it all at if you don't develop a routine of suffering and suffering is not like go out and kill yourself every day it's being uncomfortable that keeps you hungry every day if you live in your victories for so long and say I'm going to go challenge myself for 30 days or for two weeks or one this run this one marathon and it ends I did one Marathon that's why it leaves you it leaves you because you haven't set up the next obstacle obstacles is how you grow you must continue to have friction friction is where growth is at no friction there's no growth these people go to the gym they get big they get jacked they can run fast all that [ __ ] but the only thing they're doing is they're coding over the mind all you're doing is building a bigger stronger quitter your mind hasn't gotten an

import http from 'http';
import httpProxy from 'http-proxy';
// Create a proxy server with custom application logic
const proxy = httpProxy.createProxyServer({});
// Create your server that makes an operation that waits a while
// and then proxies the request
http.createServer((req, res) => {
// Modify headers
@dentropy
dentropy / install.sh
Created January 30, 2024 04:47 — forked from shkarupa-alex/install.sh
Ubuntu 22.04 + Cuda
# Prioritize NVIDIA packages
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
# Fetch NVIDIA keys
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
# Add NVIDIA repos
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
@dentropy
dentropy / index.js
Created September 13, 2023 10:19
better-sqlite3 demo
import sqlite from 'better-sqlite3';
let populate_data = `
-- Create the 'customers' table
CREATE TABLE IF NOT EXISTS customers (
customer_id INTEGER PRIMARY KEY,
first_name TEXT,
last_name TEXT,
email TEXT
);
@dentropy
dentropy / Load Mnemonic into EthersJS using DOTENV.md
Last active July 9, 2023 01:54
Load Mnemonic into EthersJS using DOTENV
@dentropy
dentropy / bad-md-processor.js
Created April 13, 2023 05:11
bad-md-processor.js
import sqlite3 from 'sqlite3';
import fs from 'node:fs/promises'
import { glob } from 'glob'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {frontmatter} from 'micromark-extension-frontmatter'
import {frontmatterFromMarkdown, frontmatterToMarkdown} from 'mdast-util-frontmatter'
import { syntax } from 'micromark-extension-wiki-link'
import * as wikiLink from 'mdast-util-wiki-link'
// const db = new sqlite3.Database(':memory:');
@dentropy
dentropy / delete_all_sqlite_tables.py
Created April 13, 2023 03:00
SQLAlchemy Delete all tables in database
from sqlalchemy import create_engine, MetaData
import os
# set up the connection to the database
engine_path = "sqlite+pysqlite:///" + "/".join(os.getcwd().split("/")) + "/scraped_data.db"
engine = create_engine(engine_path)
conn = engine.connect()
# get all table names
meta = MetaData()