1️⃣
🐦🍐🌳
2️⃣
🐢🐦 🐢🐦
🐦🍐🌳
1️⃣
🐦🍐🌳
2️⃣
🐢🐦 🐢🐦
🐦🍐🌳
grunt.registerTask('deps', 'Test that package.json dependencies were installed correctly.', function() { | |
var pkg = grunt.file.readJSON('package.json'); | |
var total = 0; | |
['dependencies', 'devDependencies'].forEach(function(key) { | |
var deps = pkg[key]; | |
if (!deps) { return; } | |
grunt.verbose.subhead(key); | |
Object.keys(deps).forEach(function(name) { | |
total++; |
var ko = require('knockout'); | |
ko.components.register('simple-name', require('./components/simple-name/simple-name.js')); | |
ko.applyBindings({ userName: ko.observable() }); |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: kibana | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Make sense of a mountain of logs. | |
### END INIT INFO |
//Wait for relevant code bits to load before starting any tests | |
define(['core.js'], function( core ) { | |
module("Core Tests"); | |
test("Test core methods", function(){ | |
expect(2); | |
equals( 1, 1, "A trivial test"); | |
ok( true, "Another trivial test"); | |
}); |
# | |
# Nginx host conf | |
# | |
# Allows Laravel 4 and SimpleSamlphp to exist together peacefully | |
# | |
# Laravel 4 - | |
# https://github.com/laravel/laravel | |
# SimpleSamlphp - | |
# https://github.com/simplesamlphp/simplesamlphp | |
# |
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
echo "source ~/.git-completion.bash" >> ~/.bash_profile |
Kibana 3 against ElasticSearch 1.4 throws an Connection Failed screen. The error text says to set http.cors.allow-origin
, but it misses out the important http.cors.enabled: true
Working config:
$ grep cors elasticsearch-1.4.0.Beta1/config/elasticsearch.yml
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
<?php | |
class Picture { | |
public function init_remove_hwstring() { | |
add_filter('image_downsize', array($this, 'remove_hw_from_downsize'), 10, 3); | |
add_filter('wp_get_attachment_image_attributes', array($this, 'add_srcset_sizes'), 10, 3); | |
} | |
public function add_srcset_sizes($attrs, $attachment, $size) { |
# To be pasted in ~/.profile | |
vagrant() { | |
if [[ $@ == "halt all" ]]; then | |
command vagrant global-status | grep running | colrm 8 | xargs -L 1 -t vagrant halt | |
else | |
command vagrant "$@" | |
fi | |
} |