Skip to content

Instantly share code, notes, and snippets.

View rocboronat's full-sized avatar
🦆
Bulding Flutter apps

Roc Boronat rocboronat

🦆
Bulding Flutter apps
View GitHub Profile
private fun launchIntents(context: Context) {
val whatsappIntent = getWhatsappIntent(context)
val telegramIntent = getTelegramIntent(context)
val intents = listOfNotNull(whatsappIntent, telegramIntent)
val globalIntent = Intent()
val chooserIntent = Intent.createChooser(globalIntent, "Send message")
.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toTypedArray())
@chunter
chunter / pageant-autoload-keys-at-startup.txt
Created June 20, 2017 10:51
Make Pageant autoload keys at startup
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.
@rocboronat
rocboronat / PermissionGranter.java
Last active December 26, 2022 07:05
Tap the "allow" button while running an Android instrumental test using UIAutomator
package com.fewlaps.android.permissiongranter;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
import android.support.v4.content.ContextCompat;
@thisismitch
thisismitch / haproxy.cfg
Last active November 11, 2023 04:08
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@lopspower
lopspower / README.md
Last active January 19, 2024 10:54
What's difference between -nodpi and -anydpi?

Difference between -nodpi and -anydpi

Android Studio exposes developers to -nodpi and -anydpi in various places. For example, if you use the New Resource Directory wizard thing, and you choose to add a density qualifier to the directory, you will see "No Density" (-nodpi) and "Any Density" (-anydpi) options.

Some of you might expect these to be well-documented.

In a word, no.

However, courtesy of a fair amount of experimentation (largely done as part of work on this Stack Overflow question and this answer), their use becomes at least a bit clearer. Many thanks to Stack Overflow user rds for the help!

@Aracem
Aracem / AndroidManifest.xml
Last active March 22, 2016 14:51
Speedup Compile time in debug enabling vmSafeMode. USe this Manifest in your debug folder
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 Upclose.me All rights reserved.
~
~ 0000000 xx
~ 00000000 xxxx
~ 0000000000 xxl
~ 00000000000000
~ 000000000000
~ 00000000
@miglen
miglen / Apache Tomcat 8 Start stop script init.d script
Last active November 10, 2022 20:03 — forked from valotas/tomcat.sh
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under