Create and initialize your a directory for your Express application.
$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init| const path = require('path'); | |
| /** | |
| * Helper function infers Webpack aliases from tsconfig.json compilerOptions.baseUrl and | |
| * compilerOptions.paths. | |
| * | |
| * @param {string} tsconfigPath - Path to tsconfig.json (can be either relative or absolute path). | |
| * @return {object} An object representing analogous Webpack alias. | |
| */ | |
| module.exports = (tsconfigPath = './tsconfig.json') => { |
| #!/bin/bash | |
| JAR=$(find -type f -name 'paper-*.jar' -printf %f\\n | sort | head -1) | |
| echo Found jar: ${JAR} | |
| while true; do | |
| java -server -Xms1G -Xmx1G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar ${JAR} | |
| echo ""; | |
| for i in {5..1}; do | |
| echo "Server has stopped. Auto-restarting in $i seconds. Ctrl+C to cancel." && sleep 1; | |
| done | |
| sleep 1; |
| #include "stdafx.h" | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <Windows.h> | |
| #include "prio.h" | |
| //Convenient define for the fdwReason | |
| #define VERIFIER_LOAD 4 | |
| /* | |
| Prototypes for additional event callbacks (dll load, unload, and heap free). If you wanted to, you could respond to these events. We will |
sudo apt-get install build-essential tcl
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
| // NOTE: This is now rolled up in a package and supports more scenarios: https://github.com/dsherret/using-statement | |
| interface IDisposable { | |
| dispose(); | |
| } | |
| function using<T extends IDisposable>(resource: T, func: (resource: T) => void) { | |
| try { | |
| func(resource); | |
| } finally { |
| var testObject = { | |
| pi: Math.PI, | |
| e: Math.E, | |
| one: 1, | |
| x: 1.5, | |
| str: "1.2345" | |
| }; | |
| var places = 2, | |
| json = JSON.stringify(testObject, function(key, value) { |
| var data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); |