Skip to content

Instantly share code, notes, and snippets.

@jlwestsr
jlwestsr / elasticsearch-handlers-main.yml
Created September 19, 2018 18:26 — forked from labrown/elasticsearch-handlers-main.yml
Ansible rolling restart of Elasticsearch Cluster
---
###
# Elasticsearch Rolling restart using Ansible
###
##
## Why is this needed?
##
#
# Even if you use a serial setting to limit the number of nodes processed at one
@jlwestsr
jlwestsr / vagrant-box-update-all.sh
Last active August 9, 2018 16:12 — forked from gMagicScott/vagrant-box-update-all.sh
Update all locally installed vagrant boxes and cleanup (prune) older versions.
#!/bin/bash
#
# FILE: vagrant-box-update-all.sh
# Update all locally installed vagrant boxes and cleanup (prune) older versions.
#
# $ bash ./vagrant-box-update-all.sh
#
# Find all boxes which have updates
@jlwestsr
jlwestsr / wbtweb001.rb
Created July 10, 2012 17:15
Chef role override block for nginx.... not working.
override_attributes(
"nginx" => {
"version" => "1.2.2"
}
)
@jlwestsr
jlwestsr / references.rb
Created May 2, 2012 12:30 — forked from olov/references.rb
Jekyll markdown references plugin by Olov Lassus: Keep all your markdown reference-style link definitions in one file (_references.md)
# references.rb: jekyll markdown references plugin
#
# add this file to your _plugins directory (create it if needed)
# create a file (exactly) named _references.md in your Jekyll site root,
# then add your markdown reference-style link definitions to it.
# for example:
# [jsshaper]: http://jsshaper.org "an extensible framework for JavaScript syntax tree shaping"
#
# you can now reference these links in any markdown file
@jlwestsr
jlwestsr / tag_cloud_tag.rb
Created May 2, 2012 12:28 — forked from ilkka/tag_cloud_tag.rb
Jekyll tag cloud / tag pages plugin
module Jekyll
class TagCloudTag < Liquid::Tag
safe = true
def initialize(tag_name, text, tokens)
super
end
def render(context)
html = ""
@jlwestsr
jlwestsr / haml_converter.rb
Created May 2, 2012 12:28 — forked from radamant/haml_converter.rb
Simple haml-sass conversion for jekyll
module Jekyll
require 'haml'
class HamlConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /haml/i
end
require 'fileutils'
class Jekyll < Thor
include FileUtils
method_options :format => :optional
def draft(name)
format = options[:format] || "markdown"
slug = name.downcase.gsub(/ +/,'-').gsub(/[^-\w]/,'').sub(/-+$/,'')
filename = slug + ".#{format}"
@jlwestsr
jlwestsr / ed-parcell-jquery-couchdb-example.html
Created March 17, 2011 01:26
This is the completed html file for the blog post that Ed Parcell posted at http://blog.edparcell.com/using-jquery-and-couchdb-to-build-a-simple-we
<!DOCTYPE html>
<html>
<head>
<title>Simple Address Book</title>
<link rel="stylesheet" href="style/main.css" type="text/css">
<script src="/_utils/script/json2.js"></script>
<script src="/_utils/script/jquery.js?1.3.1"></script>
<script src="/_utils/script/jquery.couch.js?0.9.0"></script>
<script type="text/javascript">
$db = $.couch.db("addressbook");