by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
| # Multiple inheritance with Modules as an alternative to injected composition | |
| # from Sandi Metz's talk [Nothing is Something](http://confreaks.tv/videos/bathruby2015-nothing-is-something) | |
| # Like Sandi's 'direct' DI method this has behavior outside of the base class | |
| # that gets composed together. However in this gist I compose modules in class | |
| # definitions instead of injecting collaborators. | |
| # Tradeoffs between this and Sandi's version are that in this case the API consumer doesn't | |
| # have to know how to make a RandomEchoHouse (no `house = House.new(formatter: Whatever.new)`), | |
| # but also the API consumer can't make anything not already accounted for either. |
| apt-get clean autoclean | |
| apt-get autoremove --yes | |
| rm -rf /var/lib/{apt,dpkg,cache,log}/ |
| ;;; eio.el --- Support for creating Elisp exercises | |
| ;; Author: Jason Lewis | |
| ;; Created: 5 June 2015 | |
| ;; This file is not part of GNU Emacs. | |
| ;;; Commentary: | |
| ;; | |
| ;; Provides utility functions for stubbing elisp exercises |
| user web; | |
| # One worker process per CPU core. | |
| worker_processes 8; | |
| # Also set | |
| # /etc/security/limits.conf | |
| # web soft nofile 65535 | |
| # web hard nofile 65535 | |
| # /etc/default/nginx |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentabout:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
I am not liable for any damages/loss of data.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
(HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".
ansible-playbook --connection=local 127.0.0.1 playbook.yml127.0.0.1 ansible_connection=localJon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| (defadvice org-archive-subtree (around fix-hierarchy activate) | |
| (let* ((fix-archive-p (and (not current-prefix-arg) | |
| (not (use-region-p)))) | |
| (afile (org-extract-archive-file (org-get-local-archive-location))) | |
| (buffer (or (find-buffer-visiting afile) (find-file-noselect afile)))) | |
| ad-do-it | |
| (when fix-archive-p | |
| (with-current-buffer buffer | |
| (goto-char (point-max)) | |
| (while (org-up-heading-safe)) |