- 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
This file contains hidden or 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
| # Install tmux 3.0a on Centos | |
| # install deps | |
| sudo yum install -y gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz | |
| tar -xf libevent-2.1.11-stable.tar.gz | |
| cd libevent-2.1.11-stable | |
| ./configure --prefix=/usr/local |
This file contains hidden or 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
| from __future__ import absolute_import, division, print_function, \ | |
| with_statement | |
| from ctypes import c_char_p, c_int, c_long, byref,\ | |
| create_string_buffer, c_void_p | |
| import os | |
| import logging | |
| libcrypto = None | |
| loaded = False |
This file contains hidden or 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
| # Make sure you grab the latest version | |
| curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
| # Unzip | |
| unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
| # Move protoc to /usr/local/bin/ | |
| sudo mv protoc3/bin/* /usr/local/bin/ | |
| # Move protoc3/include to /usr/local/include/ |
This file contains hidden or 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
| function testCSSVariables() { | |
| var color = 'rgb(255, 198, 0)'; | |
| var el = document.createElement('span'); | |
| el.style.setProperty('--color', color); | |
| el.style.setProperty('background', 'var(--color)'); | |
| document.body.appendChild(el); | |
| var styles = getComputedStyle(el); | |
| var doesSupport = styles.backgroundColor === color; |
This file contains hidden or 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
| #!/bin/sh | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
| if [[ "$STAGED_FILES" = "" ]]; then | |
| exit 0 | |
| fi | |
| PASS=true |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
This file contains hidden or 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
| read -e IMAGE; | |
| defaults write com.apple.desktop Background "{default = {ImageFilePath='$IMAGE'; };}" | |
| killall Dock |
This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
NewerOlder