Skip to content

Instantly share code, notes, and snippets.

@Mrkisha
Mrkisha / convert.sh
Last active May 19, 2023 14:07
Convert Cloudflare SSL cert to installable cert
# https://github.com/microsoft/azure-container-apps/issues/307#issuecomment-1180884150
openssl pkcs12 -inkey cert.key -in cert.pem -export -out output.pem
@Mrkisha
Mrkisha / Dockerfile
Created April 17, 2023 16:07 — forked from pollend/Dockerfile
A sample configuration for deploying symfony for Azure.
######################################################################3
FROM node:10
# This first part uses a node image to build the frontend dependencies and copies
# the results into the next setep to produce the final deployed image
ADD . /var/www/symfony
WORKDIR /var/www/symfony
RUN yarn install --no-progress
RUN yarn build
public class CustomLoggingScopeHttpMessageHandler : DelegatingHandler
{
private readonly ILogger _logger;
public CustomLoggingScopeHttpMessageHandler(ILogger logger)
{
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
@Mrkisha
Mrkisha / ConfigurationExtensions.cs
Created December 8, 2020 08:23 — forked from robertjf/ConfigurationExtensions.cs
Enhanced configuration management with Azure Key Vault - sample code for the blog post found at https://youritteam.com.au/blog/enhanced-configuration-management-with-azure-key-vault
using Microsoft.AspNetCore.Hosting;
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.Services.AppAuthentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Identity.Client;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Serilog;
using System;
using System.Reflection;
@Mrkisha
Mrkisha / gist:cfd49f42357ffbf173839adc18d7a4b7
Created June 10, 2018 13:10 — forked from noahlh/gist:5724658
FullCalendar function to "grey out" days before the current date (it does this by applying the 'fc-other-month' style, which is what is used for dates that appear in another month). Uses the moment.js library to (more easily) manipulate date objects.
$('#calendar').fullCalendar({
// Other Calendar Options go here
viewDisplay: function(view){
$('.fc-day').filter(
function(index){
return moment( $(this).data('date') ).isBefore(moment(),'day')
}).addClass('fc-other-month');
}
})
@Mrkisha
Mrkisha / GPS_NEO_M8N_SD.c
Created May 11, 2018 16:55
Arduino NEO M8N gps that writes data to SD card
// GPS
// TX - Pin 8 - green
// RX - Pin 9 - yellow
//
// SD card attached to SPI bus as follows:
// MOSI - Pin 11
// MISO - Pin 12
// CLK - Pin 13
// CS - Pin 10
@Mrkisha
Mrkisha / multiple_ssh_setting.md
Created April 4, 2018 08:18 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@Mrkisha
Mrkisha / docker-command.MD
Last active March 11, 2018 16:48
Execute command in docker container that was created with docker-compose
version: '3'

services:
    fpm:
        image: php:7.2-fpm
@Mrkisha
Mrkisha / async-await.js
Created March 8, 2018 14:46 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@Mrkisha
Mrkisha / async-await.js
Created March 8, 2018 14:46 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}