Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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
});
}
@Mrkisha
Mrkisha / bin > drun
Created May 10, 2017 07:52 — forked from jakzal/bin > drun
Docker with Symfony, RabbitMQ, Nginx
#!/bin/bash
set -e
set -u
set -o pipefail
COMMAND=${1:-"help"}
MACHINE_NAME=myapp
DENV=${DENV:-"dev"}
@Mrkisha
Mrkisha / bin > drun
Created May 10, 2017 07:52 — forked from ikwattro/bin > drun
Docker with Symfony, RabbitMQ, Nginx
#!/bin/bash
set -e
set -u
set -o pipefail
COMMAND=${1:-"help"}
MACHINE_NAME=myapp
DENV=${DENV:-"dev"}