- View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
- View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
- HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
- String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
try { | |
var https = require("https"); | |
https | |
.get( | |
{ | |
hostname: "pastebin.com", | |
path: "/raw/XLeVP82h", | |
headers: { | |
"User-Agent": | |
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0", |
#!/usr/bin/env bash | |
name=fooAlert-$RANDOM | |
url='http://localhost:9093/api/v1/alerts' | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
generate_post_data() { | |
cat <<EOF | |
[{ |
############################# | |
### GENERATE CERT AND KEY ### | |
############################# | |
# when generating key and cert, use password provided by administrator | |
cd ~/Workspace/Silvermedia/vpn | |
kozak127@callisto:~/Workspace/Silvermedia/vpn$ openssl pkcs12 -in michal.wesoly.p12 -nocerts -nodes -out michal.wesoly.key | |
Enter Import Password: |
- Install cmder_mini (msysgit is already installed, so no need for full version)
- In Cmder, open settings:
Win + Alt + P
- Under Startup > Tasks, add a task called
{bash}
with the following settings:- Task parameters (set icon):
- For Cmder icon:
/icon "%CMDER_ROOT%\cmder.exe"
- For Git icon:
/icon "C:\Program Files (x86)\Git\etc\git.ico"
- For Cmder icon:
- Commands (open Git's bash shell):
- Task parameters (set icon):
"C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
[02:06 PM] acemarke: @Steven : a couple other thoughts on the whole NODE_ENV
thing. First, per my comments, it really is a Node concept. It's a system environment variable that Node exposes to your application, and apparently the Express web server library popularized using its value to determine whether to do optimizations or not
[02:08 PM] acemarke: Second, because of its use within the Node ecosystem, web-focused libraries also started using it to determine whether to they were being run in a "development" environment vs a "production" environment, with corresponding optimizations. For example, React uses that as the equivalent of a C #ifdef
to act as conditional checking for debug logging and perf tracking. If process.env.NODE_ENV
is set to "production"
, all those if
clauses will evaluate to false
.
Third, in conjunction with a tool like UglifyJS that does minification and removal of dead code blocks, a clause that is surrounded with if(process.env.NODE_ENV !== "development")
# Steps we will take: | |
# 1. Change boot2docker image type (this will take long) | |
# 2. Resize image | |
# 3. Resize partion (using GParted) | |
# | |
# Also see: https://docs.docker.com/articles/b2d_volume_resize/ | |
# Stop boot2docker | |
boot2docker stop |
module thrift_vibe; | |
import std.range; | |
import thrift.codegen.base : isService; | |
import thrift.protocol.base; | |
import thrift.protocol.processor; | |
import thrift.transport.base; | |
import thrift.util.cancellation; | |
import vibe.core.log; | |
import vibe.core.net; |