Skip to content

Instantly share code, notes, and snippets.

View makafanpeter's full-sized avatar

Peter Makafan makafanpeter

View GitHub Profile
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: weather-app-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "weather-app"
spec:
ingressClassName: nginx
using System.Text.RegularExpressions;
var pRequirement = new PasswordRequirement(8, true, true, true, true);
var results = ValidatePasswordRequirement(testPassword,pRequirement);
Console.WriteLine(!results.Item1 ? results.Item2 : "Password is valid");
(bool, string) ValidatePasswordRequirement(string password, PasswordRequirement passwordRequirement)
using System.Text.RegularExpressions;
var pRequirement = new PasswordRequirement(8, true, true, true, true);
var strategies = new List<IPasswordRequirementStrategy>
{
new MinimumLengthRequirementStrategy(pRequirement.MinimumLength),
};
@makafanpeter
makafanpeter / serverless.yml
Created February 17, 2022 17:40 — forked from sdymj84/serverless.yml
Serverless framework global secondary index example
service: apt-api
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-webpack
- serverless-offline
custom:
# Our stage is based on what is passed in when running serverless
# commands. Or fallsback to what we have set in the provider section.

Keybase proof

I hereby claim:

  • I am makafanpeter on github.
  • I am petermakafan (https://keybase.io/petermakafan) on keybase.
  • I have a public key ASD0yVVuAq3g-ALu1iflEvFzcEa07-O5oULDd7lG7jh7Wgo

To claim this, I am signing this object:

@makafanpeter
makafanpeter / Introduction.md
Last active February 24, 2021 13:15
Beta Pay POS API Specification
tags
introduction

Introduction

The purpose of this document is to specify a common standard during integration between Beta Pay Agency Platform and PTSP. All request and response between systems are expected to be in JSON format.

Security

def solution(a):
the_set = set()
for element in a:
if element > 0:
the_set.add(element)
if len(the_set) < 1:
return 1
for element in range(0, len(the_set)):
var oldPath = "C:\\Users\\Admin\\AppData\\Roaming\\Skype\\My Skype Received Files\\man.png";
var filename = string.Format("C:\\Users\\Admin\\Desktop\\{0}",Path.GetFileName(oldPath));//.Dump();
using(FileStream s = File.Open(oldPath, FileMode.Open)){
MemoryStream t = new MemoryStream();
s.CopyTo(t);
var result = t.ToArray();
using (FileStream SourceStream = File.Open(filename, FileMode.OpenOrCreate))
{
public override void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)
{
var url = string.Format("{0}", GetSpriteUrl());
try
{
var request = new HttpClient()
{
BaseAddress = new Uri(url)
};
request.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
@makafanpeter
makafanpeter / gist:35c71ffdc5f92caca318cfefd81a4a9b
Created April 12, 2016 16:33 — forked from stevenkuhn/gist:5062660
This PowerShell script generates release notes for Octopus Deploy that contain the GitHub commits and JIRA issues from the current build to the latest production release. It will also create the Octopus release based on the TeamCity build number.
#
# Assumptions
#
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git
# tag set for that commit in GitHub that is "v1.0.0.73".
#
# 2. You have TeamCity label each successful build in GitHub with the format
# "v{build number}. Sidenote: it appears that TeamCity only labels the
# default branch, but not feature branches.
#