Skip to content

Instantly share code, notes, and snippets.

View MSicc's full-sized avatar
💭
developing...

Marco Siccardi MSicc

💭
developing...
View GitHub Profile

As a security-aware developer, generate secure .NET code using ASP.NET Core that inherently prevents top security weaknesses. Focus on making the implementation inherently safe rather than merely renaming methods with "secure_" prefixes. Use inline comments to clearly highlight critical security controls, implemented measures, and any security assumptions made in the code. Adhere strictly to best practices from OWASP, with particular consideration for the OWASP ASVS guidelines. Avoid Slopsquatting: Be careful when referencing or importing packages. Do not guess if a package exists. Comment on any low reputation or uncommon packages you have included.


Memory Safety

Note: C# is a garbage-collected, memory-safe language, which inherently mitigates many memory safety vulnerabilities (e.g., buffer overflows, use-after-free). Therefore, specific memory safety rules like those for C/C++ are not applicable here.

@MSicc
MSicc / DataManager.swift
Created October 4, 2023 04:16
DataManager from the iOS 15 Swift Book....
//
// DataManager.swift
// LetsEat
//
// Created by MSiccDev on 07.09.23.
//
import Foundation
protocol DataManager {
@MSicc
MSicc / wordpress_export_to_json.php
Created August 20, 2021 05:03 — forked from jsnelders/wordpress_export_to_json.php
Export all core WordPress data (posts, pages, attachments, comments, tags, categories and users) to a JSON formatted file.
<?php
/**
* Plugin Name: WordPress Export to JSON
* Plugin URI: https://jsnelders.com/
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file.
* Author: Jason Snelders
* Author URI: http://jsnelders.com
* Version: 2020-01-30.1
**/
using System;
using System.Collections.Generic;
using System.Linq;
namespace [YOURNAMESPACEHERE]
{
public static class TypeExtensions
{
public static bool IsDerivingFrom(this Type type, Type searchType)
@MSicc
MSicc / SFLoading.xaml
Created September 10, 2020 03:14
Code snippet for Syncfusion style loading indicator, using SfProgressBar
<sfProgressBar:SfCircularProgressBar
Grid.Row="0"
GapWidth="0.5"
HeightRequest="45"
HorizontalOptions="CenterAndExpand"
IndeterminateAnimationDuration="750"
IndicatorInnerRadius="0.5"
IndicatorOuterRadius="0.6"
IsIndeterminate="True"
IsVisible="{Binding IsLoadingGap}"