Real unit test (isolation, no children render)
Calls:
- constructor
- render
| // Init Masonry | |
| var $grid = jQuery('.facetwp-template').masonry({ | |
| percentPosition: true, | |
| columnWidth: '.grid-sizer', | |
| itemSelector: '.grid-item' | |
| }); | |
| // Reload and update on FacetWP load | |
| jQuery(document).on('facetwp-loaded', function() { | |
| $grid.masonry('reloadItems') |
| <?php | |
| /** | |
| * Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor | |
| * | |
| * @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/ | |
| */ | |
| add_action( 'after_wp_tiny_mce', function(){ | |
| ?> | |
| <script> |
| /* | |
| works with JQ | |
| usage | |
| <p class="targetElement">Text to scale</p> | |
| $('.targetElement').scaleFontSize({minFontsize: 12}); | |
| minFontsize минимальное размер шрифта для уменьшения, default 16px. | |
| Определяется переполнение по ширине и высоте. | |
| Определение переполнения по высоте работает если элементу задан height. |
| # On slow systems, checking the cached .zcompdump file to see if it must be | |
| # regenerated adds a noticable delay to zsh startup. This little hack restricts | |
| # it to once a day. It should be pasted into your own completion file. | |
| # | |
| # The globbing is a little complicated here: | |
| # - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct. | |
| # - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error) | |
| # - '.' matches "regular files" | |
| # - 'mh+24' matches files (or directories or whatever) that are older than 24 hours. | |
| autoload -Uz compinit |
Normally, when you diff an [Ansible vault][], all you see is gibberish.
$ git diff -- group_vars/all/vault.yml
diff --git a/group_vars/all/vault.yml b/group_vars/all/vault.yml
index 245ccf4..90bf9ee 100644
--- a/group_vars/all/vault.yml
+++ b/group_vars/all/vault.yml
@@ -1,111 +1,111 @@
$ANSIBLE_VAULT;1.1;AES256| // This will open up a prompt for text to send to a console session on digital ocean | |
| // Useful for long passwords | |
| (function () { | |
| var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
| function f() { | |
| var character = t.shift(); | |
| var i=[]; | |
| var code = character.charCodeAt(); | |
| var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
| { | |
| "name": "my-app", | |
| "version": "1.0.0", | |
| "description": "My test app", | |
| "main": "src/js/index.js", | |
| "scripts": { | |
| "jshint:dist": "jshint src/js/*.js", | |
| "jshint": "npm run jshint:dist", | |
| "jscs": "jscs src/*.js", | |
| "browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| var hbs = require('hbs'); | |
| app.set('view engine', 'html'); | |
| app.engine('html', hbs.__express); | |
| app.use(express.json()); | |
| app.use(express.urlencoded()); |