Skip to content

Instantly share code, notes, and snippets.

View M-Razavi's full-sized avatar
🏹
Focusing

Mahdi Razavi M-Razavi

🏹
Focusing
View GitHub Profile
@vrischmann
vrischmann / .credentials
Last active January 20, 2023 11:57
Running SBT with a Nexus proxy with authentication
realm=Sonatype Nexus Repository Manager
host=nexus.company.com
user=admin
password=admin123
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active March 31, 2025 12:58
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@joesan
joesan / sbt-utilities
Created May 15, 2017 20:59
Ignore Tests when Running SBT
sbt 'set test in Test := {}' clean assembly
@M-Razavi
M-Razavi / gist:6818b7d3285ddf4cd0a24054f72e4112
Created June 7, 2019 15:53 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@slabad
slabad / powerline_mac.md
Last active April 20, 2024 22:40
Powerline Font Install for Mac #terminal

Download the pre-patched powerline symbols font file.

$ wget -c https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf

  • Open “Font Book” (Hit Cmd + Space to open spotlight and type Font Book).
  • Go to “File > Add Fonts” and open the PowerlineSymbols.otf file.
  • After the font is added, right click on “PowerlineSymbols” font and select “Validate Font”.
  • Now the font should be installed and ready to use.
  • If you are using iTerm, change the non-ascii font to PowerSymbols to start using the powerline fonts.
@ocindev
ocindev / init.sh
Last active December 12, 2021 10:32
Convenient script to setup a WSL dev environment with Docker, sdkman.io, Maven, AdoptOpenJDK 1.8, NPM and Node.js
# Replace with your windows username
win_user=<replace>
# Update the apt package list.
sudo apt-get update -y
# Install Docker's package dependencies.
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
@ph4r5h4d
ph4r5h4d / .aliases
Last active June 13, 2021 13:32
Useful zsh aliases
alias dc="docker compose"
alias k="kubectl"
alias d="docker"
alias gc="gcloud"
# docker related aliases
alias dsp="docker system prune -f"
alias dspa="docker system prune -fa"
alias ds="docker stats"