Skip to content

Instantly share code, notes, and snippets.

View antoine-pous's full-sized avatar
🐺

Antoine Pous antoine-pous

🐺
View GitHub Profile
@enriched
enriched / jsonSchemaInterface.ts
Last active December 8, 2023 07:28
TypeScript interface for Json-Schema V4
/**
* MIT License
*
* Copyright (c) 2016 Richard Adams (https://github.com/enriched)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@nestoralvaro
nestoralvaro / konamiCode.js
Created January 11, 2012 22:30
Snippet to detect Konami Code (and then do something)
/******************************************************************************
* This script detects the Konami code
* (Full Konami Code obtained from: http://en.wikipedia.org/wiki/Konami_Code)
* If the Konami code is detected the function called "startUpKonami" is invoked.
* You can do whatever you want on "startUpKonami". Right now this method just:
* - Detachs the Konami code detection (so no further detections can happen).
* - Invokes an external function.
*
* Note: In case the user presses keys like "shift", "caps lock", "Ctrl"...
* the code will have to be reentered from scratch