Skip to content

Instantly share code, notes, and snippets.

View vhoyer's full-sized avatar
😵‍💫
kinda burnt out

Vinícius Hoyer vhoyer

😵‍💫
kinda burnt out
View GitHub Profile
@vhoyer
vhoyer / userdialogs.md
Created July 20, 2018 11:48
Para usar o aritchie/userdialogs no xamarin forms
  • install the package userdialogs
  • abrir o MainActivity.cs do Android e inicializar o pacote no android
Acr.UserDialogs.UserDialogs.Init(this);
  • chamar no projeto o Acr.UserDialogs.UserDialogs.Instance.*
  • esse * é o uso de um dos métodos fornecidos pelo pacote
excelIt = async () => {
let text = "";
let unread = document.querySelectorAll(".emails-list-item.email-unreaded > a");
unread.forEach(e => {
e.click();
await new Promise(resolve => setTimeout(resolve, 10000));
var iframe = document.querySelector("iframe").contentDocument;
@vhoyer
vhoyer / colors.html
Created April 27, 2018 16:09
Teste suas cores em Hex
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<input autofocus type="text" id="color" />
<div id="colors"></div>
@vhoyer
vhoyer / LoadingModal.cs
Created April 25, 2018 14:14
Xamarin Plugin that adds a loading modal
using Xamarin.Forms;
namespace vhoyer.XamPlugins.MoreModals
{
public class LoadingModal
{
private AbsoluteLayout layout;
private AbsoluteLayout AbsLoadingBG, AbsLoadingFG;
private ActivityIndicator ActLoading;
#!/bin/bash
nuget.exe sources Add -Name "<Source Name>" -Source "<Sorce link>" -username "abcd" -password "****"
@vhoyer
vhoyer / AutoIncrement_AndroidManifest.ps
Created April 13, 2018 11:42
The variables are one char long due to my original limitations of the script lenght, sorry for that. the commentaries I added later
#Path to the AndroidManifest
$p="path\to\manifest\AndroidManifest.xml"
#Get the content of the file
$f=Get-Content $p
#Describe the pattern to search to edit the versionCode with RegEx
$r=@"
android:versionCode="\d+"
"@
using System;
using System.IO;
using System.Linq;
using System.Threading;
namespace KeyGenerator {
class Program {
static readonly char[] valid = "0123456789abcdefghijklmnopqrstuvxywzABCDEFGHIJKLMNOPQRSTUVXYWZ".ToCharArray();
static string lastKey = String.Format("{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}", valid[0]);
static double lastIndex = 0;
{
"options": {
"population": 50,
"elitism": 0.2,
"randomBehaviour": 0.1,
"mutationRate": 0.5,
"mutationRange": 2,
"network": [
16,
[
using System;
using System.Collection.Generic;
using System.Web;
public class inputUtils
{
public void clearAll(Control[] _controls)
{
for(int i = 0; i > _controls.Lenght; i++)
{
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Generic;
public class MessageBox
{
/// <summary>
/// Displays an Message Box with the defined Text and title, current supporting only "okCancel" Buttons
/// </summary>