Skip to content

Instantly share code, notes, and snippets.

View dc0d's full-sized avatar
💭
Some Sketches ¯\_(ツ)_/¯

Kaveh Shahbazian dc0d

💭
Some Sketches ¯\_(ツ)_/¯
View GitHub Profile
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active November 23, 2023 10:13
What killed Haskell, could kill Rust, too
View What_killed_Haskell_could_kill_Rust.md

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active December 11, 2023 11:40
[Recipe] Delete all your likes/favorites from Twitter
View delete-likes-from-twitter.md

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@ww9
ww9 / gist_blog.md
Last active November 11, 2023 18:22
Using Gist as a blog #blog
View gist_blog.md

Blogging with Gist

Gist simplicity can turn blogging into a liberating experience.

Pros Cons
✅ Free, simple, fast, hassle-free ❌ Image upload in comments only
✅ Tagging ❌ No post pinning
✅ Search ❌ Doesn't look like a blog
✅ Revisions ❌ Unfriendly URLs
@tadasv
tadasv / orm.go
Last active February 14, 2022 19:19
Simple ORM for Golang
View orm.go
/*
This is an implementation of simple ORM that supports CRUD operations on single object, column mapping from struct tags.
example:
type Account struct {
orm.Model
UUID string
Name string
Email string
@rnwolf
rnwolf / spacemacs-keybindings.md
Last active May 21, 2023 09:54 — forked from kiambogo/spacemacs-keybindings
spacemacs keybindings that i need to learn
View spacemacs-keybindings.md
@bketelsen
bketelsen / gaweb.service
Created December 5, 2017 20:10
systemd unit file for a go web app
View gaweb.service
# /etc/systemd/system/gaweb.service
[Unit]
Description=gopheracademy website
[Service]
PIDFile=/tmp/gaweb.pid-3001
User=gaweb
Group=gaweb
Environment=GO_ENV=production
Environment=POSTGRES_PASSWORD=SomePassWord
@jdk
jdk / start_docker_registry.bash
Last active August 26, 2018 09:25 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
View start_docker_registry.bash
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# Make sure you have backports, add this to /etc/apt/source.list
# jesse-backports
@asukakenji
asukakenji / 0-go-os-arch.md
Last active December 5, 2023 06:17
Go (Golang) GOOS and GOARCH
View 0-go-os-arch.md

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@crittermike
crittermike / wget.sh
Last active December 6, 2023 09:17
Download an entire website with wget, along with assets.
View wget.sh
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@Ravenstine
Ravenstine / aws-couchdb-setup.md
Last active November 3, 2023 10:21
Fast CouchDB setup in AWS
View aws-couchdb-setup.md

Fast CouchDB setup in AWS

CouchDB is a NoSQL database for storing JSON documents. It comes with a REST API out of the box so your client applications can persist data while requiring you to write little or no server-side code. CouchDB's killer feature is its ability to easily replicate, which allows for horizontal scaling, easy backup, and for client adapters to synchronize documents. This is perfect if you want to write an application that is offline-first. It's become my go-to database when creating new