Skip to content

Instantly share code, notes, and snippets.

View leosilvadev's full-sized avatar
🇩🇪
"Simplicity is the ultimate sophistication" - Leonardo da Vinci

Leonardo Silva leosilvadev

🇩🇪
"Simplicity is the ultimate sophistication" - Leonardo da Vinci
  • Vivy GmbH
  • Berlin, Germany
View GitHub Profile
apply plugin: 'com.moowork.node'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active June 27, 2024 17:48
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
@JMBattista
JMBattista / install_gradle
Last active April 24, 2018 17:31
Upgrade Gradle Codeship
#!/bin/bash
# Allows using different Gradle versions with http://codeship.io
#
# As @altfatterz points out below this isn't necessary if you choose to check in your .gradle and gradlew.bat/gradlew.sh files.
# I prefer not to check-in the generated files so I set this up.
#
# We update the path here instead of via the environment variables because you cannot control the order
# that environment variables are set in the Environment tab, and this results in the path NOT having the version number
# see test_commands for info on how to run gradle without settings the path here if you want to avoid it.
#
@cjus
cjus / sample-nginx.conf
Last active July 12, 2023 14:59
AngularJS Nginx and html5Mode
server {
server_name yoursite.com;
root /usr/share/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}