Skip to content

Instantly share code, notes, and snippets.

View AdityaChaudhary's full-sized avatar

Aditya Chaudhary AdityaChaudhary

View GitHub Profile
@hadrienblanc
hadrienblanc / git-submodules.md
Last active December 9, 2023 01:13
Git submodules cheatsheet

Git Submodules cheatsheet

Why having a submodule ?

With git you can add a submodule to a repository. A submodule is another repository inside a repository.

How to create a submodule ?

git submodule add [email protected]:my_account/my_submodule.git path_to_my_submodule
@ThomasHambach
ThomasHambach / express-joi-typescript-validate-middleware.ts
Last active September 25, 2019 19:05
Express + Joi + Typescript validation middleware
app.get("/some-endpoint", validate({...}), (req, res, next) => {});
32bit
set disassembly-flavor intel
define hook-stop
info registers
x/24wx $esp
x/5i $eip
end
@brennanMKE
brennanMKE / hero.ts
Last active September 21, 2024 23:00
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@sckalath
sckalath / wget_vbs
Last active July 18, 2024 14:35
wget vbscript
echo strUrl = WScript.Arguments.Item(0) > wget.vbs
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs
echo Dim http,varByteArray,strData,strBuffer,lngCounter,fs,ts >> wget.vbs
echo Err.Clear >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs