Skip to content

Instantly share code, notes, and snippets.

View kuuyee's full-sized avatar
🏠
Working from home

光子 kuuyee

🏠
Working from home
  • 能源电力
  • Beijing China
View GitHub Profile
@kuuyee
kuuyee / atexit.go
Created November 17, 2015 09:17 — forked from perillo/atexit.go
// Copyright 2015 Manlio Perillo. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// Package atexit implements support for running deferred functions in case of
// abnormal exit (in contrast to a normal exit when the program returns from
// the main function).
//
// Since calling os.Exit, e.g. during a signal handler, does not call deferred
// functions, a complementary mechanism is required when the program acquires
@kuuyee
kuuyee / exit_check.go
Created November 16, 2015 09:13 — forked from philpennock/exit_check.go
Showing interactions of defer, os.Exit and panic in Golang.
package main
import (
"container/list"
"flag"
"fmt"
"os"
"sync"
"time"
)
@kuuyee
kuuyee / blog.md
Created May 25, 2012 09:03 — forked from aslakknutsen/blog.md
How to make Awestruct a blogger platform

Awestruct is a very nice dynamic static web site generation tool that has a powerful extension pipeline.

Normally you will back your Awestruct site in a Git repository. You create a file on your local file system, commit it to the repository, regenerate the site and push it live. But we can take it one step further, why not have a simple web gui where you can write your blogs? What about GitHub Gists?

Awestruct::Extension::Gist

The setup is as easy as it get. Simply add the following to your pipeline.rb like this:

extension Awestruct::Extensions::Gist.new( 'username', 'password' )