Skip to content

Instantly share code, notes, and snippets.

@realnsleo
realnsleo / HttpProxy.go
Created October 24, 2023 04:31 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@realnsleo
realnsleo / LearnPress REST API
Created January 24, 2023 13:56 — forked from Marinski/LearnPress REST API
LearnPress REST API is a plugin which adds endpoints for LearnPress LMS to the WordPress REST API // EDIT: LearnPress released official version of a REST API for their core plugin. TheYou can read the docs in their website: https://docspress.thimpress.com/developer-learnpress/#sections-5 . LearnPress REST API has been introduced in version 4 of …
<?php
/*
* Plugin Name: LearnPress to WP Rest API
* Plugin URI: https://www.webapp.bg/wp-extensions/learnpress-rest-api
* Description: A plugin to add endpoints for LearnPress to WP REST API
* Version: 1.0
* Author: Marin Stoyanov
* Author URI: https://www.webapp.bg/
* License: GPL2
*/
@realnsleo
realnsleo / hero.ts
Created August 5, 2022 08:48 — forked from brennanMKE/hero.ts
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;