Skip to content

Instantly share code, notes, and snippets.

View ZeVS777's full-sized avatar

Владимир ZeVS777

  • Russia, Moscow
View GitHub Profile
@ZeVS777
ZeVS777 / DisplayEnumsWithValuesDocumentFilter.cs
Last active December 3, 2019 22:18
Swashbuckle.AspNetCore 5.0.0-rc support for Unchase.Swashbuckle.AspNetCore.Extensions
public class DisplayEnumsWithValuesDocumentFilter : IDocumentFilter
{
private string AddEnumValuesDescription(OpenApiSchema schema)
{
if (schema.Enum.Count == 0)
{
return null;
}
var sb = new StringBuilder();
@ZeVS777
ZeVS777 / Mesh.cpp
Last active June 10, 2023 13:46
Udemy - Computer Graphics with Modern OpenGL and C++ / code files after 02 - Beginner 016 CODING Clean Up
#include "Mesh.h"
Mesh::Mesh()
{
VAO = 0, VBO = 0, IBO = 0, indexCount = 0;
}
void Mesh::CreateMesh(GLfloat* vertices, unsigned int* indices, unsigned int numOfVertices, unsigned int numOfIndices)
{
indexCount = numOfIndices;
@ZeVS777
ZeVS777 / cookies.js
Created October 6, 2016 08:26 — forked from CrocoDillon/cookies.js
Export your awesome module using AMD, CommonJS, Node.js or just as global.
/*
* Inspiration (well… copy pasting more or less) from:
* https://github.com/ScottHamper/Cookies/blob/0.3.1/src/cookies.js#L127-L140
*
* Thanks Scott!
*/
(function (global) {
'use strict';
var MyModule = function () {
@ZeVS777
ZeVS777 / Class.js
Last active September 22, 2019 08:36
Javascript patterns
var Class = (function () {
"use strict";
//Private property
var variable = 5;
//Constructor
function ClassInstance(param) {
if(!(this instanceof ClassInstance)){
return;