Skip to content

Instantly share code, notes, and snippets.

@rphlmr
rphlmr / clear-db.ts
Last active March 12, 2025 07:41
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@carlcidromero
carlcidromero / neomutt-setup.md
Last active November 22, 2024 11:36
Basic Setup For Multiple Gmail Accounts In Neomutt

Basic Setup For Multiple Gmail Accounts In Neomutt

Just started using Neomutt, so my setup is still very basic.
It was quite a headache getting it to work with multiple Gmail accounts.
Hopefully the information below helps you and future me.

References

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@xrman
xrman / gist:4468f545b169969466bceb694d742dad
Created March 12, 2019 21:47
FastStone Capture Full Serial Key
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@basarat
basarat / md5.ts
Created November 2, 2017 00:43
Create md5 using TypeScript / JavaScript / NodeJS
import * as crypto from 'crypto';
export const md5 = (contents: string) => crypto.createHash('md5').update(contents).digest("hex");
@parmentf
parmentf / GitCommitEmoji.md
Last active March 13, 2025 09:20
Git Commit message Emoji
@keithchambers
keithchambers / build-centos7-docker-image.sh
Last active December 22, 2021 23:59
Build a CentOS 7 docker image.
#!/bin/bash -e
DIST="centos7"
TAG="$(date +%Y%m%d)"
IMG_DIR="${PWD}/buildroot-${DIST}"
REPO_DIR="${IMG_DIR}/etc/yum.repos.d"
RPMS=(
bind-utils
bash
@miguelmota
miguelmota / README.md
Last active January 6, 2025 03:43
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active January 15, 2025 08:49
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 13, 2025 09:13
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname