Skip to content

Instantly share code, notes, and snippets.

View aruss's full-sized avatar
😎

Ruslan Akiev aruss

😎
  • Germany
View GitHub Profile
@aruss
aruss / Web.config
Last active July 6, 2017 08:57
UR Rewrite rules
<rule name="Whitelist IPs" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{REMOTE_ADDR}" pattern="212.203.321.40" negate="true" />
<add input="{REMOTE_ADDR}" pattern="5.13.161.12" negate="true" />
</conditions>
<action type="AbortRequest" />
</rule>
<rule name="WWW to non WWW" stopProcessing="true">
@aruss
aruss / Program.cs
Last active September 27, 2017 09:51
.NET Core with Serilog
namespace SerilogTest
{
using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
public class Program
{
public static void Main(string[] args)
{
@aruss
aruss / Dockerfile
Created May 27, 2020 11:00
Node development without node
FROM ubuntu:18.04
LABEL maintainer="[email protected]"
LABEL version="0.1"
LABEL description="This is custom image for node projects development"
# Disable prompt during packages installation
ARG DEBIAN_FRONTEND=noninteractive
# Update repository and install all common required bits and pieces
import subprocess
import json
import sys
def parse_version(version_str):
try:
# Remove any non-numeric characters like '^' or '~'
return [int(x) for x in version_str.replace('^', '').replace('~', '').split('.')]
except ValueError:
# Handle non-numeric versions differently or skip them