Skip to content

Instantly share code, notes, and snippets.


karl zhoujiealex

View GitHub Profile
zhoujiealex / pedantically_commented_playbook.yml
Created Oct 28, 2016 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
# ^^^ YAML documents must begin with the document separator "---"
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
zhoujiealex / Ansible-Vault
Created Oct 24, 2016 — forked from tristanfisher/Ansible-Vault
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.
View Ansible-Vault

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

View BC4Key
View package.json
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.2.0"
"dependencies": {
"hexo": "^3.1.1",
"hexo-deployer-git": "^0.1.0",
zhoujiealex / gulpfile.js
Last active Apr 19, 2018
sample of gulpfile.js for hexo generate blog, compress public files
View gulpfile.js
/* Refrences:
var gulp = require('gulp');
var minifycss = require('gulp-clean-css');
zhoujiealex / .travis.yml
Last active May 28, 2016
sample of ,travis.yml
View .travis.yml
# Refrecnes:
language: node_js
node_js: stable
View alert.js
var render = hexo.render;
* alert tag
* Syntax:
* {% alert caption [style] %}
* Alert string
* {% endalert %}
import urllib2,urllib
import re