Skip to content

Instantly share code, notes, and snippets.

@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active May 1, 2024 21:12
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@McKabue
McKabue / Get_All_Routes_in_ASP.NET_MVC_Core_2.cs
Last active May 11, 2023 07:16
Get all routes, including default routes specified at start up
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using System;
using System.Linq;
using System.Threading.Tasks;
@matthewzring
matthewzring / markdown-text-101.md
Last active May 8, 2024 07:26
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@dwilkie
dwilkie / docker-cheat-sheat.md
Last active January 18, 2024 10:56
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@nickyleach
nickyleach / Lock.php
Created September 10, 2012 22:54
Simple redis-backed Mutex
<?
class Lock {
const TIMEOUT = 20;
const SLEEP = 100000;
/**
* Stores the expire time of the currently held lock
* @var int
/**
* Mule Development Kit
* Copyright 2010-2011 (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ushkinaz
ushkinaz / cygwin-mirror-speed.py
Created October 9, 2011 19:16
Tests speed of http mirrors of cygwin
#!/usr/bin/env python3
"""
Tests http mirrors of cygwin
"""
import random
import time
from urllib.request import urlopen
import sys
__author__ = 'Dmitry Sidorenko'
@chrismatthieu
chrismatthieu / gist:964754
Created May 10, 2011 15:58
SIP Registrar with Tropo PSTN
// Run Redis - cd redis-2.2.4 and run src/redis-server
var sip = require('sip');
var sys = require('sys');
var redis = require('redis');
var tropoapi = require('tropo-webapi');
//Trim leading and trailing whitespace from string values.
function trim(str) {
return str.replace(/^\s+|\s+$/g, '');