One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
" Author: Dave Hulihan | |
" Purpose: Prints cute markdown header at the top | |
" of the file, based on filename. | |
" Print filename header in markdown | |
function! MarkdownHeader() | |
let @a = "#" | |
put! a | |
put % | |
normal ggJ |
#!/bin/bash | |
set -e | |
echo -e "Image Converter for Slack Emoji\nNOTICE: The image will be overwritten." | |
if [ $# -lt 1 ]; then | |
echo "USAGE:" | |
echo -e " ${0} IMG_FILE [IMG_FILE...]\n" | |
echo "IMG_FILE:" |
[Unit] | |
Description=Apache Kafka server (broker) | |
Documentation=http://kafka.apache.org/documentation.html | |
Requires=network.target remote-fs.target | |
After=network.target remote-fs.target | |
[Service] | |
Type=simple | |
PIDFile=/var/run/kafka.pid | |
User=kafka |
via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun)
zf#j
creates a fold from the cursor down # lines.zf/string
creates a fold from the cursor to string .zj
moves the cursor to the next fold.zk
moves the cursor to the previous fold.zo
opens a fold at the cursor.zO
opens all folds at the cursor.zm
increases the foldlevel by one.zM
closes all open folds.#! /bin/sh | |
# /etc/init.d/kafka: start the kafka daemon. | |
# chkconfig: - 80 20 | |
# description: kafka | |
KAFKA_HOME=/usr/share/kafka | |
KAFKA_USER=root | |
KAFKA_SCRIPT=$KAFKA_HOME/bin/kafka-server-start.sh | |
KAFKA_CONFIG=$KAFKA_HOME/config/server.properties |
# in spec_helper.rb | |
RSpec.configure do |config| | |
records = [] | |
config.before :suite do | |
Cequel::Record.descendants.each do |klass| | |
klass.after_create {|r| records << r } | |
end | |
end |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Store somewhere | |
class SitemapGenerator | |
def initialize(app) | |
@app = app | |
end | |
def manipulate_resource_list(resources) | |
sitemap_builder = ::Middleman::Sitemap::Resource.new( | |
@app.sitemap, |