Skip to content

Instantly share code, notes, and snippets.

View Stratus3D's full-sized avatar

Trevor Brown Stratus3D

View GitHub Profile
@peterbartha
peterbartha / README.md
Last active April 22, 2024 17:57
Convert Rust books to EPUB (incl. The Rust Programming Language)

Convert Rust books to EPUB (incl. The Rust Programming Language)

The following steps work for all the HTML learning materials on the Learn Rust page:

  1. Click on the "Print this book" icon in the top right corner.
  2. "Cancel" print popup.
  3. Press F12.
  4. Copy, paste, and run the contents of ebookFormatPreparation.js into your browser's console.
  5. Save the modified HTML file.
@PJUllrich
PJUllrich / big-o.md
Last active April 28, 2024 14:19
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@pdgonzalez872
pdgonzalez872 / hire_elixir_devs.md
Last active November 9, 2023 16:39
Hire Elixir devs - Part of an email reply to a recruiter

I'm a member of the Erlang Ecosystem Foundation (https://erlef.org/) and part of that in my opinion is making sure folks know how to reach Elixir devs when they need to. I'm very interested in helping you showcase that your company is hiring so heavily for Elixir. Since you were kind in our email exchange, I'll return the kindness and hopefully help you find as many Elixir devs you can hire :). Just promise me to keep creating more Elixir jobs : ) :

Here are some interesting ways to find Elixir devs:

@streetturtle
streetturtle / start-a-meeting
Last active March 3, 2023 20:23
Script to start a Google Meet meeting in a default browser and copy the link to the meeting to the clipboard
#!/bin/bash
# Script to start a new Google Meet meeting and copy the link to the clipboard. Supports Google Chrome and Firefox
#
# Prerequisite
# - xclip
# - browser extension to display url of the currently opened page in the window's title
# - Chrome: https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb
# In Extension's Options set following:
# - Tab title format: {title} - {protocol}://{hostname}{port}/{path}
@xydinesh
xydinesh / multiple-url-paths.lua
Created March 25, 2020 22:43 — forked from anonymous/multiple-url-paths.lua
Benchmark multiple url paths with wrk
-- Resource: https://github.com/timotta/wrk-scripts/blob/master/multiplepaths.lua
-- Initialize the pseudo random number generator
-- Resource: http://lua-users.org/wiki/MathLibraryTutorial
math.randomseed(os.time())
math.random(); math.random(); math.random()
-- Shuffle array
-- Returns a randomly shuffled array
function shuffle(paths)
# Using the benchee library
keys =
1..12
|> Enum.map(fn key ->
Integer.to_string(key)
end)
map =
keys
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active April 22, 2024 13:01
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@ethagnawl
ethagnawl / coupon-codes.txt
Created October 30, 2017 04:59
Top 100 Ecommerce Coupon Codes
# source: https://www.slideshare.net/CouponFollow/top-100-most-common-coupon-code-phrases
fall
twitter
black
MEMORIAL
TWEET20
FREESHIP
earlybird
MONDAY
holidays
@Ambroos
Ambroos / WARNING.md
Last active November 30, 2023 06:20
Remove SentinelOne agent from Mac. Because honestly, it doesn't seem to do anything at all. Run as root, best is to do this from a recovery mode, single user mode with writeable filesystem, ...

USE AT OWN RISK

This was only tested on a 'partial' SentinelOne installation on the High Sierra beta, where SentinelOne was never allowed to enable it's kernel extension. (Some things failed while I was messing around with OS betas.)

This script is most likely outdated.

A lot happens in 2+ years, at this point there's a good chance this script will do more harm than good. Read the comments before using!