Skip to content

Instantly share code, notes, and snippets.

@dthomas
dthomas / Doctrine-Multi-Tenancy.md
Created October 24, 2020 17:25 — forked from CarlosEduardo/Doctrine-Multi-Tenancy.md
Multi-Tenancy (tenant) Strategy for Doctrine ORM
@dthomas
dthomas / 100_base.conf
Created January 16, 2020 10:07 — forked from danackerson/100_base.conf
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@dthomas
dthomas / note.md
Created April 22, 2016 04:46 — forked from yang-wei/note.md
Vue.js tips and tricks

Notes: All the examples below are only tested on Vue.js 1.0 (above).

Notes: The examples below use ES6 so it's recommended to use browserify or webpack to easily integrate babel.

when or where can we use this.$el

When you need to access DOM attribute, be careful with the lifecycle. Vue.js has a few useful lifecycle hooks.

Let's say we want to scroll our component to the bottom (imagine it's a long list with overflow-y: auto) once it's instantiate.