Skip to content

Instantly share code, notes, and snippets.

View barzamin's full-sized avatar
🌆
i continue to work. the city sleeps.

erin petra sofiya moon barzamin

🌆
i continue to work. the city sleeps.
View GitHub Profile
@garbados
garbados / gist:f82604ea639e0e47bf44
Created July 27, 2014 23:07
Falsehoods Programmers Believe About Gender
  1. There are two and only two genders.
  2. Okay, then there are two and only two biological genders.
  3. Gender is determined solely by biology.
  4. Okay, it’s mostly determined by biology, right?
  5. Please tell me it’s determined by DNA.
  6. Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
  7. Once gender is set, it never changes.
  8. Even if the gender can change, it will only change from the one value to the other value.
  9. Only one gender can be “active” at the same time.
  10. We’re tracking gender now, so we’ve always tracked it.
@xero
xero / irc.md
Last active July 10, 2024 12:09
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@drguildo
drguildo / gist:2073b2457717f0fc7bec
Last active August 4, 2022 05:45
Fear and Loathing in Ukraine
Post by Underflow
====================
Post 1
====================
Here's what happened to an acquaintance of mine a few years ago. She told me this over the phone after I mentioned the joose. I started taping the conversation with her consent after a lengthy preamble - she asked to clean up any direct references to people or locations, cause she promised the people involved never to make this public; one of the guys is still working.
The friend's from Ukraine, but after listening to the story again I'm not 100% sure this took place there, as she was moving about a bit at that time. She was trying to get press work as a free-lance journalist and had made a deal with an ambulance crew to accompany them at night in the roughest districts in return for a few hundred US dollars and a case of Jack Daniel's.
anonymous
anonymous / disclosure.md
Created August 22, 2017 04:46
A letter for coming out as trans

[Recipient], this might be the most difficult conversation we will ever have. I want to share something hard that’s going on in my life, because I love and trust you, and I know you love me.

So I want to make a deal with you: I won’t try to police how you feel, and if you are angry or upset, that’s fine. But I need you to not explode or retreat. I ask that, as a once-in-a-lifetime favor to me, you listen, all the way through, and reserve judgment and questions until the end. Ultimately, I think this can be positive for both of us. Is that something we can do together?

It means a lot to me that you are willing to listen. There’s a lot to get through, so I wrote most of it down. I’m going to read it because it will make things easier, and I will give you this copy when we are done.

To get to the point, [time of realization], I came to the shocking, and completely unwelcome realization that I’m transgender.

Yes, this means that, despite being assigned [birth gender] based on my genitalia at birth, as a

@NoraCodes
NoraCodes / work_queue.rs
Last active February 21, 2024 15:27
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active July 17, 2024 07:40
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@0xa
0xa / followings.py
Last active July 27, 2022 13:28
Mastodon followings management
#!/usr/bin/env python3
"""
A script that go through your followings and unfollows dead accounts.
It notices empty accounts, accounts that were deleted locally and remotely,
and also cleans up dead instances if allowed to.
It has a cache so you can run it once without --unfollow to preview its
actions, and a second time that will skip all verified active profiles.
With colors and a nice progress bar with item count, %, and ETA.
package com.unascribed.materialpicker;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
public enum MaterialColor {
RED("Red",
0xFF_F44336,
@0xabad1dea
0xabad1dea / speedrunning-faq.md
Last active February 26, 2024 17:42
Speedrunning FAQ/Glossary

Speedrunning FAQ/Glossary

by 0xabad1dea September 2018

You may notice a decidedly Nintendo bias to the examples. I can't change who I am.

What is Speedrunning?

Speedrunning is:

  • Completing a video game
@qpwo
qpwo / monte_carlo_tree_search.py
Last active July 22, 2024 09:10
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math