Skip to content

Instantly share code, notes, and snippets.

View bast's full-sized avatar
🦀
rusting

Radovan Bast bast

🦀
rusting
View GitHub Profile
@aidanhs
aidanhs / gist:5ac9088ca0f6bdd4a370
Last active September 25, 2024 11:17
Rust binary tree worked example

PLEASE DON'T USE THIS GUIDE

It's over 9 years old (as of 2024-02-18), there are many better guides! You might like https://rust-unofficial.github.io/too-many-lists/

% Let's build a binary tree!

Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:

  1. must have a value
@vandorjw
vandorjw / Tutorial
Last active May 27, 2016 13:52
Centos Nginx Python3.4 uWSGI Emperor
Here are steps:
1. # yum upgrade
2. $ curl -O http://fedora.mirror.nexicom.net/epel/6/i386/epel-release-6-8.noarch.rpm
3. # yum localinstall epel-release-6-8.noarch.rpm
4. $ curl -O http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
5. # yum localinstall pgdg-centos93-9.3-1.noarch.rpm
6. # yum install postgresql93-server postgresql93-contrib postgresql93-devel
7. # service postgresql-9.3 initdb
8. # service postgresql-9.3 start
@crccheck
crccheck / README.md
Last active March 2, 2024 16:39
Python Packaging

What the Hell? -- A Journey Through the Nine Circles of Python Packing

Writing a setup.py

map

I am no Virgil, but having stumbled my way through Python packaging a few times already, I'm documenting the things I learn as I go here.

To help me learn, I took a survey of the top 15 Python packages on Github along with 12 other commonly referenced packages. I thought... if there are any best

@masak
masak / explanation.md
Last active April 10, 2025 16:42
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.