Skip to content

Instantly share code, notes, and snippets.

View zhoujiealex's full-sized avatar

karl zhoujiealex

View GitHub Profile
@zhoujiealex
zhoujiealex / ludatui.py
Last active August 29, 2015 14:08 — forked from zippera/ludatui.py
#coding=utf8
##版本:1.0
##环境:python2.7
##作者:moxie
##日期:2013.08.23
##说明:文件生成目录为:D:/ludatui
import urllib2,urllib
import re
@zhoujiealex
zhoujiealex / alert.js
Last active August 29, 2015 14:08 — forked from wzpan/alert.js
var render = hexo.render;
/**
* alert tag
*
* Syntax:
* {% alert caption [style] %}
* Alert string
* {% endalert %}
*/
@zhoujiealex
zhoujiealex / .travis.yml
Last active May 28, 2016 12:51
sample of ,travis.yml
# Refrecnes:
# http://www.think-diff.me/2016/05/28/travis-ci-deploy-blog/
# https://zespia.tw/blog/2015/01/21/continuous-deployment-to-github-with-travis/
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs
# https://github.com/iissnan/theme-next-docs/blob/master/.travis.yml
# http://changyuheng.me/2015/when-hexo-static-site-meets-github-pages-and-travis-ci/
language: node_js
node_js: stable
@zhoujiealex
zhoujiealex / package.json
Created May 28, 2016 15:06
hexo packagejson
{
"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",
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
q2Kw2pjoiDs5gIH-uw5U49JzOB6otS7kThBJE-H9A76u4uUvR8DKb+VcB
rWu5qSJGEnbsXNfJdq5L2D8QgRdV-sXHp2A-7j1X2n4WIISvU1V9koIyS
NisHFBTcWJS0sC5BTFwrtfLEE9lEwz2bxHQpWJiu12ZeKpi+7oUSqebX+
@zhoujiealex
zhoujiealex / Ansible-Vault how-to.md
Created October 24, 2016 09:10 — forked from tristanfisher/Ansible-Vault how-to.md
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.

##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.

@zhoujiealex
zhoujiealex / pedantically_commented_playbook.yml
Created October 28, 2016 09:23 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ 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
zhoujiealex / gulpfile.js
Last active April 19, 2018 02:29
sample of gulpfile.js for hexo generate blog, compress public files
/* Refrences:
1. http://notes.iissnan.com/2016/publishing-github-pages-with-travis-ci
2. https://github.com/chrisjlee/hexo-theme-zurb-foundation/blob/e82f45a82bbaaee063bcb1298cd9793575afb142/gulpfile.js
3. https://github.com/gulpjs/gulp/blob/master/docs/recipes/delete-files-folder.md
4. https://hexo.io/api/
5. https://github.com/iissnan/theme-next-docs/blob/master/.travis.yml
*/
var gulp = require('gulp');
var minifycss = require('gulp-clean-css');