This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Minesweeper generator for Discord messages. Idea and emotes were peeped from SKrshe and kjagodka. | |
// How to use: | |
// Paste this code into browser's console and press Enter (it will put message with game into clipboard). | |
// Paste and post message in Discord. | |
// You can change width, height and number of mines. | |
// But Discord has limit of number of emotes: 199 - (number of spoilers). So 10 by 10 field is impossible. | |
const width = 11 | |
const height = 9 | |
let numberOfMines = 17 | |
if (width * height > 99) throw new Error("Field is too big! Please, make width or height smaller.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
# See http://www.sublimetext.com/docs/syntax.html | |
name: Porth | |
scope: source.porth | |
file_extensions: | |
- porth | |
variables: | |
char_escape: '\\n|\\r|\\\\|\\"|\\''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const fs = require('fs'); | |
// const os = require('os'); | |
// console.log(os.networkInterfaces()) | |
// const net = require('net'); | |
// console.log(net.isIP("123.123.123.333")) | |
// http://localhost:8000/echo/server/index.php?what=is&this=donno | |
// fetch("127.0.0.1:8000/api/endpoint/",{method: "POST", body:"text"}).then(data=>data.text().then(console.log)) | |
// https://canyouseeme.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Find and launch x64 Native Tools Command Prompt if needed | |
if not defined DevEnvDir ( | |
if "%VSWHERE%"=="" set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | |
) | |
if not defined DevEnvDir ( | |
for /f "usebackq tokens=*" %%i in (`call "%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do ( | |
set InstallDir=%%i | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Midikeys.js | |
* > Turn your keyboard into a midi keyboard, compatible with the Web MIDI API. | |
* Copyright 2012 Nick Thompson | |
* MIT License | |
* https://gist.github.com/3995530 | |
*/ | |
(function (window, document, undefined) { | |
// Keycode to MIDI note values |