Skip to content

Instantly share code, notes, and snippets.

View madelinecr's full-sized avatar
:octocat:
Octocatting

Finn madelinecr

:octocat:
Octocatting
View GitHub Profile
/*******************************************************************************
* Copyright © 2014 Kevin Mark *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
@acairns
acairns / publish
Created January 5, 2014 11:58
Bash script to publish Jekyll post from _drafts into _posts
#!/bin/sh
if [ -z "$1" ]
then
echo "No draft file found"
exit
fi
mv $1 _posts/`date +"%Y-%m-%d"`-`basename $1`
@jasoncodes
jasoncodes / vim_tips.markdown
Last active December 21, 2015 00:08
Vim Tips

Vim Tips

fresh

Build your dotfiles (shell, Vim config) from multiple sources with fresh.

Both of our dotfiles are built using fresh. We source Vim and other config from each other:

@iamamused
iamamused / publisher.rb
Last active January 6, 2017 13:32
Post publishing plugin for Jekyll
module Jekyll
class PostPublisher < Generator
safe false
def replace(filepath, regexp, *args, &block)
content = File.read(filepath).gsub(regexp, *args, &block)
File.open(filepath, 'wb') { |file| file.write(content) }
end
def generate(site)