Skip to content

Instantly share code, notes, and snippets.

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

Leandro Maguna madnotdead

🏠
Working from home
  • Mercado Libre
  • Buenos Aires
View GitHub Profile
@madnotdead
madnotdead / NetworkingUtils.kt
Last active September 21, 2019 13:49
Networking utility to get data from a URL
private val SLEEP_TIME = 5000L
private val TAG = "CounterAsyncTask"
private fun sendGet(urlToCall: String = "https://www.google.com/") {
Thread.sleep(SLEEP_TIME)
val url = URL(urlToCall)
with(url.openConnection() as HttpURLConnection) {
@madnotdead
madnotdead / example.swift
Created May 30, 2019 21:21
Using guard properly
guard let contentSubs = serie.season[0].content[0].subtitle, contentSubs.count > 0 else {
langsContainer.isHidden = true;
//Aca no se deberia esconder skeleton?
return
}
langs.text = contentSubs.map { LanguageHelper.getName(from: $0.lang).get(orSet: "") }.joined(separator: ", ")
langs.hideSkeleton()
@madnotdead
madnotdead / .gitlab-ci.yml
Last active November 7, 2017 18:02
Gitlab-CI configuration file. tags belong to existing runners.
image: jangrewe/gitlab-ci-android:latest
before_script:
- if [ ! -d /cache$ANDROID_HOME ]; then mv $ANDROID_HOME /cache$ANDROID_HOME; fi
- export ANDROID_HOME=/cache$ANDROID_HOME
- cd LTCfastpay
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./gradlew
stages:
- build