Skip to content

Instantly share code, notes, and snippets.

View dan085's full-sized avatar

Daniel dan085

  • Chile
  • 15:26 (UTC -03:00)
View GitHub Profile
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
@dan085
dan085 / Transantiago public endpoints.md
Created July 12, 2017 03:03 — forked from radutzan/Transantiago public endpoints.md
APIs REST públicas con data del Transantiago. Respuestas en JSON.

Paraderos alrededor de un punto

http://www.transantiago.cl/restservice/rest/getpuntoparada?lat=-33.6089714&lon=-70.5742975&bip=1

Estimación de parada

http://www.transantiago.cl/predictor/prediccion?codsimt=PA420&codser=504 (código de servicio es opcional, pero el parámetro debe estar presente aunque esté vacío)

Lista de servicios

http://www.transantiago.cl/restservice/rest/getservicios/all

Info completa de servicio

BIG iOS URL SCHEME LIST
HAD TO MAKE A DROPBOX FILE BECAUSE THIS LIST WAS TOO LONG TO POST IN THE COMMENTS OR NOT MAKE THE WORKFLOW APP TAKE FOREVER TO READ IT.
☠JAILBREAK/SYSTEM APPS
--------------------------
activator://
itms-apps://
itms-services://
@dan085
dan085 / upload_demo_html.html
Created July 10, 2018 02:01 — forked from paambaati/upload_demo_html.html
Uploading files using NodeJS and Express 4
<html>
<body>
<form action="/upload" enctype="multipart/form-data" method="post">
<input type="text" name="title">
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
</body>
</html>
@dan085
dan085 / build.gradle
Created September 21, 2018 20:02 — forked from ph0b/build.gradle
sample build.gradle for generating split APKs per ABI
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@dan085
dan085 / P12toPEM.txt
Created December 9, 2018 23:15 — forked from shahdhiren/P12toPEM.txt
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@dan085
dan085 / EndlessRecyclerOnScrollListener.java
Last active September 8, 2019 04:04 — forked from justluvher/EndlessRecyclerOnScrollListener.java
Endless RecyclerView OnScrollListener for pagination b7
public abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener {
// The minimum amount of items to have below your current scroll position
// before loading more.
private int visibleThreshold = 5;
// The current offset index of data you have loaded
private int currentPage = 0;
// The total number of items in the dataset after the last load
private int previousTotalItemCount = 0;
@dan085
dan085 / compare_list.kt
Created October 17, 2019 01:50
Compare kotlin two list array.. update delete or update
fun main() {
//// usuarios del celular registrados
val sync_list_name_mobile = ArrayList<HashMap<String, String>>()
val contactMap_initial = HashMap<String, String>()
contactMap_initial.put("KEY_NAME", "PEDRO")
contactMap_initial.put("mobile", "1111")
@dan085
dan085 / gist:ffdb492290f0c0eeed7bf03531eac664
Last active January 14, 2020 14:52
Librería ion para subir archivos al servidor
Ion.with(ctx.applicationContext)
.load(AppConfig.URL_IMAGE)
.setTimeout(15000)
// .setHeader("Authorization", "b7 " + chatService.get_token())
.uploadProgress { downloaded, total ->
println("$downloaded / $total")
val percentage2 = (0.5 + downloaded.toDouble() / total.toDouble() * 100).toInt()
println(percentage2)
//progressbar_picture.setProgress(percentage2);
}
implementation fileTree(dir: 'libs', include: ['*.jar'])
//implementation(name: 'libBioMini_v20', ext: 'aar')
implementation files('libs/telpo_api.jar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'