Skip to content

Instantly share code, notes, and snippets.

Big O complexities for common methods of Java Collections and common sorting algorithms.
Complexity (Best to Worst)
===================================================================================================
O(1) < O(log n) < O(n) < O(n log n) < O(n^2) < O(2^n) < O(n!)
Collections
===================================================================================================
@mindplace
mindplace / git_and_github_instructions.md
Last active May 1, 2024 00:17
Pushing your first project to github

1. Make sure git is tracking your project locally

Do you need a refresher on git? Go through Codecademy's git course.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
    → Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  2. Check if git is already initialized: git status

@2called-chaos
2called-chaos / gist:4eacb303b9491d1e374c
Last active April 6, 2024 23:58
My nginx config for dynmap (on port 8123, that's the dynmap bound to localhost so no direct call possible)
server {
listen 80;
server_name map.geekya.com;
# I normally wouldn't disable the access log but here I see no problem with it
access_log off;
error_log /var/log/nginx/com.geekya.map.error.log;
# custom error page when map isn't available
error_page 502 503 504 =503 /503_map.html;
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git