Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| for (var i=1; i <= 20; i++) | |
| { | |
| if (i % 15 == 0) | |
| console.log("FizzBuzz"); | |
| else if (i % 3 == 0) | |
| console.log("Fizz"); | |
| else if (i % 5 == 0) | |
| console.log("Buzz"); | |
| else | |
| console.log(i); |
| // Usual function | |
| function distance(p1,p2){ | |
| var dx = p2.x-p1.x; | |
| var dy = p2.y-p1.y; | |
| return Math.sqrt(dx*dx + dy*dy); | |
| } | |
| // Faster approximation | |
| function distanceApprox(p1,p2){ | |
| // Approximation by using octagons approach | |
| var x = p2.x-p1.x; |
| var restify = require('restify'); | |
| // Authentication | |
| var passport = require('passport'); | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var sessions = require("client-sessions"); | |
| var server = restify.createServer(); | |
| server.use(restify.queryParser()); | |
| server.use(restify.bodyParser()); |
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
| /* Note: don't run this all at once. There are prompts to run some queries in another session, etc. */ | |
| WHILE @@trancount > 0 | |
| ROLLBACK | |
| GO | |
| USE master; | |
| GO | |
| IF DB_ID('lockingtest') IS NOT NULL |
| import { JWE, JWK, JWS } from 'node-jose' | |
| import fs from 'fs' | |
| import { join } from 'path' | |
| import jwkToPem from 'jwk-to-pem' | |
| import jwt from 'jsonwebtoken' | |
| const certDir = '.cert' | |
| const keystoreFile = join(certDir, 'keystore.json') | |
| const raw = { | |
| iss: 'test', |
| export default [ | |
| "Reticulating splines...", | |
| "Generating witty dialog...", | |
| "Swapping time and space...", | |
| "Spinning violently around the y-axis...", | |
| "Tokenizing real life...", | |
| "Bending the spoon...", | |
| "Filtering morale...", | |
| "Don't think of purple hippos...", | |
| "We need a new fuse...", |
| -- | |
| -- Change database owner | |
| -- | |
| ALTER DATABASE "db_name" OWNER TO user; | |
| -- | |
| -- List schemas | |
| -- |
| Netcode package: | |
| com.unity.netcode.gameobjects | |
| Mutiplayer helpers (ClientNetworkTransform): | |
| https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#main | |
| ParrelSync: | |
| https://github.com/VeriorPies/ParrelSync.git?path=/ParrelSync |