Skip to content

Instantly share code, notes, and snippets.

View mastergenius's full-sized avatar

Evgeny Shcherbinin mastergenius

View GitHub Profile
@samuelcolvin
samuelcolvin / python-people.md
Last active September 13, 2024 16:19
An incomplete list of people in the Python community to follow on Twitter and Mastodon.

Python People

(Updated 2022-11-16 with suggestions from comments below, Twitter and Mastodon)

An incomplete list of people in the Python community to follow on Twitter and Mastodon.

With the risk that Twitter dies, I'd be sad to lose links to interesting people in the community, hence this list.

I would love you to comment below with links to people I've missed.

@samcorcos
samcorcos / collision.js
Last active November 11, 2021 11:27
Algorithm for calculating hash collision probability
const calculate = (n, k) => {
const exponent = (-k * (k - 1)) / (2 * n)
return 1 - Math.E ** exponent
}
// where `n` is the number of possible unique hashes
// where `k` is the number of values created
// calculate(100000, 25) => 0.0029955044966269995 aka 0.29% chance of collision
@benjaminjackman
benjaminjackman / README
Last active August 11, 2024 13:24
Instructions on how to open Unity3d scripts in Rider on Ubuntu
#Simple instructions for using Unity3d with project rider on Ubuntu
#1. Download and install latest .deb for Unity3d from:
http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/
#2. Download and install the Project Rider EAP (not sure if publicly available but you
can sign up for early access here: https://www.jetbrains.com/rider/
#3. Open the Unity3d (.deb installs the executable at /opt/Unity/Editor/Unity )
@jiffyclub
jiffyclub / hdf_to_parquet.py
Last active September 24, 2022 16:05
Do the same thing in Spark and Pandas
"""
Convert Pandas DFs in an HDFStore to parquet files for better compatibility
with Spark.
Run from the command line with:
spark-submit --driver-memory 4g --master 'local[*]' hdf5_to_parquet.py
"""
import pandas as pd
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active September 19, 2024 12:31
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active August 12, 2024 10:45
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@staltz
staltz / introrx.md
Last active September 20, 2024 10:10
The introduction to Reactive Programming you've been missing
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@tavriaforever
tavriaforever / bemtips-es5-shims.js
Last active August 29, 2015 14:01
Если вам нужно поддерживать в проекте IE < 9
// В вашем bemjson пишем, внутри блока PAGE, один из его элементов js
[
'<!--[if lt IE 9]>',
{ elem : 'js', url : '//yandex.st/es5-shims/0.0.1/es5-shims.min.js' },
'<![endif]-->'
]
// Профит! Теперь можно пользоваться js методами типа map, reduce, some и т.д.
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.