Skip to content

Instantly share code, notes, and snippets.

View audreyt's full-sized avatar

唐鳳 audreyt

View GitHub Profile
// Generated by CoffeeScript 1.6.2
(function() {
'use strict';
var cleanModuleName, coffeescript, commonJsWrapper, createJoinConfig, deepFreeze, exec, extend, fs, getConfigDeprecations, http, indent, install, logger, normalizeChecker, normalizeConfig, normalizeDefinition, normalizeWrapper, os, recursiveExtend, replaceSlashes, setConfigDefaults, sysPath;
exec = require('child_process').exec;
coffeescript = require('coffee-script');
http = require('http');
@audreyt
audreyt / styles.scss
Created November 14, 2013 02:50
moedict extension scss
@import "compass/css3";
@include font-face("MOEDICT", font-files(
"https://www.moedict.tw/MOEDICT.woff", woff
, "https://www.moedict.tw/MOEDICT.otf", opentype
, "https://www.moedict.tw/MOEDICT.ttf", truetype
), "https://www.moedict.tw/MOEDICT.eot");
@mixin fonts {
font-family: "MOEDICT", "Biaodian Pro Sans CNS", "Fira Sans OT", "Lantinghei TC", "黑體-繁", "微軟正黑體", "儷黑 Pro", "蘋果儷中黑", "Adobe 繁黑體 Std", "cwTex 明體", "Adobe 明體 Std", "PMingLiU", "MingLiU", sans-serif, "HanaMinA", "HanaMinB", "HAN NOM A", "HAN NOM B";
}
@audreyt
audreyt / gist:7723325
Last active October 23, 2021 14:10 — forked from ETBlue/gist:7723307
.wrap.clearfix
- fs=require('fs');
- var glob=function(folder, regexp){
- var result=[];
- var files=fs.readdirSync(folder); for(var i=0;i<files.length;i++){
- var target_file = folder+'/'+files[i];
- var target_path = folder+'.html';
- var target_topic = target_path.slice(target_path.indexOf('/'),target_path.lastIndexOf('/'));
- var target_author = folder.slice(folder.lastIndexOf('/'));
- var stat = fs.statSync(target_file);
Q = require \q
p = [1 2 3]
q = [4 5 6]
(.reduce Q.when, Q!) <| for let i in p => ->
<- Q.delay 500ms .then
console.log i
(.reduce Q.when, Q!) <| for let j in q => ->
<- Q.delay 500ms .then
console.log i, j
@audreyt
audreyt / a.json.ls
Last active October 23, 2021 14:10
x: 1
y: require \./b.json.ls
z: require \./c.json.ls
@audreyt
audreyt / keymap.cson
Created February 27, 2014 17:31
My Keymap.cson for atom.io
'.vim-mode.insert-mode': {
'ctrl-n': 'autocomplete:attach'
}
'.vim-mode.command-mode:not(.mini)': {
':': 'go-to-line:toggle'
'%': 'bracket-matcher:go-to-matching-bracket'
'0': 'editor:move-to-first-character-of-line'
'ctrl-f': 'core:page-down'
'ctrl-b': 'core:page-up'
}
@audreyt
audreyt / FontForge.app.sh
Created July 19, 2014 16:20
SourceHanSansTWHK-Normal subsetting example
#!/usr/bin/env PYTHONHOME=/Applications/FontForge.app/Contents/Resources/opt/local/bin/Python.framework.2.7 DISPLAY=:0 /Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge -script
Open("/Users/audreyt/Downloads/SourceHanSansTWHK-1.000/SourceHanSansTWHK-Normal.otf")
Select(0u3000)
SelectMore(0u3001)
SelectMore(0u3002)
SelectInvert()
Clear()
Generate("SourceHanSansTWHK-Normal-Subset.ttf")
$scope.select_sitting_year = ($scope.sitting_year) ->
$scope.sittings_month = latest_months_of_sittings do
sittings
...$scope<[ committee sitting_year ]>
$scope.select_sitting_month do
select_possible_option do
$scope.sittings_month
$scope.sitting_month
$scope.select_sitting_month = ($scope.sitting_month) ->
@audreyt
audreyt / permute.rs
Last active October 23, 2021 14:10
use std::collections::Bitv;
use std::num;
fn main() {
let mut solved = Bitv::with_capacity(9999999999u, false);
let mut todo = vec![
1123456789u,
2123456789u,
3123456789u,
4123456789u,
#!/usr/bin/env lsc
XLSX = require \xlsx
sheet_to_socialcalc = do ->
const header = """
socialcalc:version:1.5
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave
"""
const sep = """
--SocialCalcSpreadsheetControlSave