Skip to content

Instantly share code, notes, and snippets.

Evgeny Zislis kesor

Block or report user

Report or block kesor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joepie91
joepie91 / express-server-side-rendering.md
Last active Oct 12, 2019
Rendering pages server-side with Express (and Pug)
View express-server-side-rendering.md

Terminology

  • 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
View ruby_revealer.sh
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@kesor
kesor / Gemfile
Last active Sep 30, 2019
Vagrantfile to create a chef-server (11.x) and a client box that uses it.
View Gemfile
source :rubygems
gem 'json', '= 1.5.4' # knife/chef 11.0 and 11.20 is broken with json 1.5.5/1.7.7
gem 'vagrant'
gem 'vagrant-hostmaster'
@smougenot
smougenot / A_Logstash.conf
Created Jul 26, 2012
Logstash Multiline Filter for Java Stacktrace (tested on field)
View A_Logstash.conf
# stacktrace java as one message
multiline {
#type => "all" # no type means for all inputs
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}
@yumike
yumike / blocks.py
Created Dec 8, 2011
Thoughts about RSpec for Python
View blocks.py
# codec: blocks
describe('articles.views.ArticleView'):
context('when user has permissions'):
it('should add new article'):
# some code
it('should delete existing article'):
You can’t perform that action at this time.