Skip to content

Instantly share code, notes, and snippets.

View ozzimpact's full-sized avatar
🏠
Working from home

Oğuzhan Demir ozzimpact

🏠
Working from home
View GitHub Profile
@ianblenke
ianblenke / es_pri_allocate_unassigned.md
Last active November 18, 2021 00:14
elasticsearch trying to allocate a primary shard which is disabled

Allow routing allocations:

curl -XPUT localhost:9200/_cluster/settings -d '{
                "transient" : {
                    "cluster.routing.allocation.enable" : "all"
                }
        }'
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active June 8, 2024 19:07
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
@ngpestelos
ngpestelos / remove-docker-containers.md
Last active May 31, 2024 15:10
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
@brianmcdo
brianmcdo / gist:8159711
Last active June 10, 2020 10:07
Install/Uninstall ElasticSearch on Ubuntu/Debian using .deb package.
Remember to install the Java JRE first.
Please see the Elasticsearch website for the latest version: http://www.elasticsearch.org/download/
wget .deb file
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.9.deb
Install
sudo dpkg -i elasticsearch-0.90.9.deb