This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/.settings | |
/.jshintrc | |
/.project | |
/*.txt | |
/*.xml | |
/*.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -20,9 +20,10 @@ blog_index_dir = 'source' # directory for your blog's index pa | |
deploy_dir = "_deploy" # deploy directory (for Github pages deployment) | |
stash_dir = "_stash" # directory to stash posts for speedy generation | |
posts_dir = "_posts" # directory for blog files | |
+org_posts_dir = "org_posts" | |
themes_dir = ".themes" # directory for blog files | |
-new_post_ext = "markdown" # default new post file extension when using the new_p | |
-new_page_ext = "markdown" # default new page file extension when using the new_p | |
+new_post_ext = "org" # default new post file extension when using the new_post t | |
+new_page_ext = "org" # default new page file extension when using the new_page t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Pychecker < Formula | |
url 'http://downloads.sourceforge.net/project/pychecker/pychecker/0.8.19/pychecker-0.8.19.tar.gz' | |
homepage 'http://pychecker.sourceforge.net/' | |
md5 'c37182863dfb09209d6ba4f38fce9d2b' | |
def install | |
system "python", "setup.py", "install", | |
"--prefix=#{prefix}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install ffmepg (for the screencast) & imagemagick (to optimize the GIF file for web usage) | |
brew install ffmpeg | |
brew install imagemagick | |
# Make the screencast and compress it | |
ffmpeg -i ScreenFlow.mov -pix_fmt rgb24 output.gif | |
convert -layers Optimize output.gif output_optimized.gif | |
# Upload it somewere in the cloud... | |
# ... and use the file in the desire website. Here's the markdown syntax: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
定义一个 markdown-mode下的 snippet | |
<pre> | |
# -*- mode: snippet -*- | |
# name: zhoubao | |
# key: zhoubao | |
# binding: C-c C-n | |
# -- | |
## ${1:#你的名字#}周报 | |
`(concat "__" (yesterday-is 1) " ~ " (tommorow-is 5) "__")` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseHandler(tornado.web.RequestHandler): | |
# ... | |
@tornado.gen.coroutine | |
def verify_place_something(self): | |
motor_db = self.settings['motor_db'] | |
cursor = motor_db.places.find( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.colaborativa.exampleapp.api; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.web | |
import tornado.ioloop | |
import logging | |
import os.path | |
def clean_filename(filename): | |
i = filename.rfind(".") | |
if i != -1: | |
filename = filename[0:i] + filename[i:].lower() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/env/ruby | |
require "benchmark" | |
require 'digest/md5' | |
# The password hash to crack | |
password_hash = "e1f3ecc31656795a128db19da490c9ec" | |
# Helper for hashing passwords | |
def md5(password) | |
Digest::MD5.hexdigest(password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
struct stock5Min | |
{ | |
unsigned short monthDay; // 月日 | |
unsigned short hourMin; // 小时, 分钟 |
OlderNewer