Skip to content

Instantly share code, notes, and snippets.

Azure Active Directory (AAD) Auth

This gist assumes a working Azure AD (not Azure AD-DS is already up and fully configured) This gist assumes working DNS / name resolution on your internal network.

this gist is part of this series

Create App Registrations

All of these steps will be done in the Azure Portal AAD UI

  1. Select App Registration from the nav bar
@zhgchgli0718
zhgchgli0718 / Fastfile
Created April 20, 2023 04:29
A simply extend the Fastlane Action to enable downloading the uploaded Universal APK from the Google Play Console.
lane :test do | options |
apk_downloader(json_key: "./xxx@xxx.iam.gserviceaccount.com.json", package_name: "m.zhgchg.li", version_code:1000, export_file_path: "./zhgchgli.apk")
end
/*------------------------
Libraries
------------------------*/
const axios = require("axios");
const fs = require("fs");
const FormData = require("form-data");
/*------------------------
Download the file.
Good article on how to download a file and send with form data - https://maximorlov.com/send-a-file-with-axios-in-nodejs/
@silasrm
silasrm / phpstorm-vs-sublimetext-shortcuts.md
Last active April 23, 2024 20:05
Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.

#Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.

Sublime Text PHPStorm Função
CMD+P CMD+Shift+O Busca por arquivos no projeto
CMD+R CMD+F12 (1) Lista os métodos da classe e outros símbolos
CMD+F CMD+F Busca no arquivo
CMD+Option+F CMD+R Busca e troca os valores no arquivo
CMD+Shift+F CMD+Shift+F Busca, busca e troca e outros em um determinado caminho com várias regras.
CMD+D (2) Option+Up (2) Seleciona palavra
@BuffaloWill
BuffaloWill / hex_00_to_FF
Created December 6, 2016 18:41
hex 00 to FF
00
01
02
03
04
05
06
07
08
09
@rydmike
rydmike / analysis_options.yaml
Last active April 23, 2024 20:05
RydMike lints v2.2.0 - Personal preferences and starting point for Dart & Flutter linter rules setup.
# RydMike LINTER Preferences v2.2.0
#
# Get this file here: https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c
#
# We include and activate all lint rules, later below we disable the not used or desired ones.
# You can find a list of all lint rules to put in your all_lint_rules.yaml file here:
# https://dart.dev/tools/linter-rules/all
#
# For a comparison of all lint rules settings in rule styles listed below, please see this Google
# sheet: https://docs.google.com/spreadsheets/d/1Nc1gFjmCOMubWZD7f2E4fLhWN7LYaOE__tsA7bf2NjA
@Reeska
Reeska / rename-js-to-jsx.js
Last active April 23, 2024 20:04
A script to convert .js to .jsx when they contains JSX tags
// node ./rename-js-to-jsx.js ./my/folder
const fs = require('fs')
const path = require('path')
// Options
const src = process.argv[2] ?? './'
const pattern = process.argv[3] ? new RegExp(`${process.argv[3]}$`) : /.js$/
const newExtension = process.argv[4] ?? '.jsx'
@Klerith
Klerith / pasos-node-typescript.md
Last active April 23, 2024 20:01
Configurar proyecto de Node con TypeScript

Pasos para usar Node con TypeScript con Nodemon

Más información - Docs Oficiales

  1. Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
@pangui
pangui / prevent_double_click.js
Created January 28, 2015 22:06
Prevent double click!
// jQuery plugin to prevent double click
jQuery.fn.preventDoubleClick = function() {
$(this).on('click', function(e){
var $el = $(this);
if($el.data('clicked')){
// Previously clicked, stop actions
e.preventDefault();
e.stopPropagation();
}else{
// Mark to ignore next click
@DanielSWolf
DanielSWolf / Program.cs
Last active April 23, 2024 20:00
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);