Skip to content

Instantly share code, notes, and snippets.

View bungabear's full-sized avatar
👻

Minjae Son bungabear

👻
View GitHub Profile
@bungabear
bungabear / github-proxy-nginx.conf
Last active February 8, 2023 08:23 — forked from sirsquidness/proxy.conf
Nginx Proxy with Cache for Github
events {
worker_connections 1024;
}
# cahce all through github.com
http {
# cache option inactive delete after 30days, total cache size 2G, cache index 1M (8,000)
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=cache_zone:1m inactive=30d max_size=2048m;
proxy_temp_path /var/cache/nginx/temp/;
@bungabear
bungabear / build.groovy
Created April 14, 2021 05:22 — forked from paramsen/build.groovy
Generate Android version code from git count in Gradle (build.gradle)
// Generate a minor version code from git commit count (for prod builds)
static def generateVersionCode() {
def result = "git rev-list HEAD --count".execute().text.trim() //unix
if(result.empty) result = "PowerShell -Command git rev-list HEAD --count".execute().text.trim() //windows
if(result.empty) throw new RuntimeException("Could not generate versioncode on this platform? Cmd output: ${result.text}")
return result.toInteger()
}
def majorVersion = 1
@bungabear
bungabear / Android Studio .gitignore
Created September 3, 2017 16:00 — forked from iainconnor/Android Studio .gitignore
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files