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 templates | |
import( | |
"html/template" | |
"io" | |
"os" | |
"strings" | |
"path/filepath" | |
) |
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
def compile_asset?(path) | |
# ignores any filename that begins with '_' (e.g. sass partials) | |
# all other css/js/sass/image files are processed | |
if File.basename(path) =~ /^[^_].*\.\w+$/ | |
puts "Compiling: #{path}" | |
true | |
else | |
puts "Ignoring: #{path}" | |
false | |
end |
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
{ | |
admin off | |
auto_https off | |
} | |
http://localhost:8080 { | |
file_server | |
} |
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
upstream default { | |
server 127.0.0.1:12345; | |
balancer_by_lua_block { | |
local balancer = require "ngx.balancer" | |
local ok, err = balancer.set_current_peer( | |
ngx.ctx.upstream_host or '127.0.0.1', | |
ngx.ctx.upstream_port or 12345 | |
) |
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/bin/env python | |
# coding: utf-8 | |
''' | |
中国联不通每月通话时间统计 | |
用法: | |
1. 去 http://iservice.10010.com/ 下载通话详单(Excel 格式),导出为 CSV | |
2. ./sumup.py *.csv | |
''' |
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
digraph { | |
思维导图 -> { OmniGraffle XMind dot }; | |
OmniGraffle -> { 排版糟糕 单调 贵 }; | |
XMind -> { 排版不错 主题好看 中文输入很麻烦 }; | |
dot -> { 很强大 灵活 不适合现场演示 }; | |
} |
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
// ==UserScript== | |
// @name barely-tweaks | |
// @namespace http://tampermonkey.net/ | |
// @version 0.6 | |
// @description UI / UX Tweaks for BearyChat | |
// @author E.T | |
// @match https://*.bearychat.com/* | |
// ==/UserScript== | |
/* global document, fetch */ |
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
#!/bin/bash | |
PACKAGE=oracle-jdk-7 | |
PACKAGE_VIRTUAL=oracle-jdk | |
VERSION_MAJOR=7 | |
VERSION_MINOR=60 | |
VERSION="${VERSION_MAJOR}u${VERSION_MINOR}" | |
BUILD=b19 | |
PKG_BASENAME="jdk-$VERSION-linux-x64.tar.gz" |
NewerOlder