Minimal safe Bash script template from Maciej Radzikowski
| #!/usr/bin/env bash | |
| # | |
| # https://gist.github.com/joehillen/30f08738c1c3c0ca3e4c754ad33ad2ff | |
| # | |
| # This script inlines 'source' files. | |
| # | |
| # For long scripts, it is nice to be able to break them into multiple files | |
| # to make them easier to work with but still release as a single script. | |
| # | |
| # Inspired by https://stackoverflow.com/a/37533160/334632 with the following enhancements: |
| # This will print all repositories found in all projects that your Azure DevOps account has access to | |
| # Example of output: | |
| # project1 / repo1 | |
| # project1 / repo2 | |
| # another-project / repo | |
| az devops project list | jq '.value[].name' | xargs -I{} az repos list --project {} | jq -r '.[] | .project.name + " / " + .name ' |
In computer science, the event loop, message dispatcher, message loop, message pump, or run loop is a programming construct that waits for and dispatches events or messages in a program.
It works by making a request to some internal or external "event provider" (that generally blocks the request until an event has arrived), and then it calls the relevant event handler ("dispatches the event").
The event-loop may be used in conjunction with a reactor, if the event provider follows the file interface, which can be selected or 'polled' (the Unix system call, not actual polling).
The event loop almost always operates asynchronously with the message originator.
This is work in progress
I read about the .NET Generic Host for the first time in a Tweet of David Fowler. And I was hooked by the idea, it was just what I was looking for.
I like modules making things small but fit together like pieces of a puzzle, if possible being able to reuse them. I started refactoring Greenshot over a year ago, and was making modules out of the spaghetti code that it was. Trying to extract the modules into their own nuget packages, making them more generic and testable. I glued them together with some code I wrote, which is availble in Dapplo.Addons, but I knew that this was just a journey, until I found something that is a better with more potential.
I found the following description: _The purpose of Generic Host is to enable a wider array of host scenarios. Messaging, backg
| { | |
| "IsEncrypted": false, | |
| "Values": { | |
| ... | |
| "OpenApi__Info__Version": "2.0.0", | |
| "OpenApi__Info__Title": "Open API Sample on Azure Functions", | |
| "OpenApi__Info__Description": "A sample API that runs on Azure Functions either 1.x or 2.x using Open API specification.", | |
| "OpenApi__Info__TermsOfService": "https://github.com/aliencube/AzureFunctions.Extensions", | |
| "OpenApi__Info__Contact__Name": "Aliencube Community", | |
| "OpenApi__Info__Contact__Email": "no-reply@aliencube.org", |
$ sudo apt-get update
$ sudo apt-get install unzip wget
$ wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
$ unzip ngrok-stable-linux-amd64.zip
$ sudo mv ./ngrok /usr/bin/ngrok
$ ngrokStatic resources can be configured using two approaches in Spring Boot
- Add custom path in application.properties/application.yaml
- Implement WebMvcConfigurer
addResourceHandlers()method
First configure your SpringSecurity class to accept requests to this resources
@Override
public void configure(WebSecurity web)
| using System; | |
| using System.Collections.Generic; | |
| using System.Net.Http; | |
| using System.Net.Http.Formatting; | |
| using Microsoft.AspNetCore.Http; | |
| using Microsoft.AspNetCore.Mvc.WebApiCompatShim; | |
| using Microsoft.Extensions.Options; | |
| using Moq; | |
| namespace Messaging.Tests |
| #!/bin/bash | |
| MODPROBEFILE="/etc/modprobe.d/CIS.conf" | |
| #MODPROBEFILE="/tmp/CIS.conf" | |
| ANSWER=0 | |
| analyze_part () { | |
| if [ "$#" != "1" ]; then | |
| options="$(echo $@ | awk 'BEGIN{FS="[()]"}{print $2}')" | |
| echo "[+]$@" | |
| apply_part_rule $1 |