Skip to content

Instantly share code, notes, and snippets.

View shassaan's full-sized avatar
⚒️
Hacking

Syed Hassaan Ahmed shassaan

⚒️
Hacking
View GitHub Profile
@shassaan
shassaan / ContextConsumer.cs
Created November 3, 2020 12:49
ContextConsumer
using (var ctx = new SchoolContext())
{
var stud = new Student()
{
StudentName = "Bill"
};
ctx.Students.Add(stud);
ctx.SaveChanges();
}
@shassaan
shassaan / profile.json
Created November 3, 2020 13:13
My Windows terminal profile
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
// You can add more global application settings here.
@shassaan
shassaan / DInjectQueuerAPC.cs
Created February 14, 2021 07:48 — forked from sunnyneo/DInjectQueuerAPC.cs
.NET Process injection in a new process with QueueUserAPC using D/invoke - compatible with gadgettojscript
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
namespace DinjectorWithQUserAPC
{
public class Program
@shassaan
shassaan / Code.cpp
Created October 19, 2021 09:22
Langrange Interpolation Implementation
#include<iostream>
using namespace std;
double* getL(double** dataValues,int nPoints,double pointOfInterest) {
double den = 1, num = 1;
double *L = new double[nPoints];
for (int i = 0; i < nPoints; i++)
{
for (int j = 0; j < nPoints; j++)
{
if (j != i)