Skip to content

Instantly share code, notes, and snippets.

@littlebtc
littlebtc / types.d.ts
Created February 1, 2019 14:54
Quick formik-semantic-ui implementation
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
declare module 'formik-semantic-ui' {
import { Fragment } from 'react'
import { FormikValues, FormikConfig, FormikState } from 'formik'
import { StrictFormProps, SemanticShorthandItem, HtmlLabelProps, FormInputProps, FormFieldProps, FormRadioProps, FormCheckboxProps, FormTextAreaProps, FormDropdownProps, FormButtonProps, DropdownItemProps, FormGroup } from 'semantic-ui-react'
export interface FormikComponentProps {
name: string
id?: string
@littlebtc
littlebtc / policy.md
Last active June 14, 2018 16:51
Semiquaver Privacy Policy

Semiquaver 暫時版隱私條款

  • 我們將會要求您的 Facebook 公開資料,此資料將僅用於登入用途,Semiquaver 團隊承諾不會將您的 Facebook 帳號等資料作其他運用或交與第三者。

  • Semiquaver 會在網站中蒐集您上傳的成績單資料,您可以在成績單的隱私頁面中調整是否要公開您的成績。如果您設為「私人」,我們將完全不會把您的成績用於任何其他場所。

  • 如果您真的不安心,想要取閱或刪除您在 Semiquaver 上的個資,現階段請以電子郵件方式聯絡小B:sst.dreams@gmail.com。感謝您。

@littlebtc
littlebtc / berlin-11.jpg
Last active August 3, 2017 18:29
osm-carto #2687 sample images
berlin-11.jpg
@littlebtc
littlebtc / gist:ecfbcb69bbde917593e4
Created July 19, 2014 16:50
「我也要用 Noto Sans」 OS X 10.9 篇

警告:小B 不負責造成電腦變成磚塊的可能性(喂

安裝字體

  1. 下載 Noto Sans 繁簡體字體包,全部的 OTF 檔都丟進 /Library/Fonts
  2. 為了避免登入畫面破字,要修改這些檔案的權限。全部改 644,而且 Owner 要改 root(如果你有潔癖,可以順便把 Group 改 wheel :P)。

修改系統字體

  1. 找到 /System/Library/Frameworks/CoreText.framework
<!-- Normal way to get comment. -->
<packet>
<thread click_revision="0" user_id="123456"
res_from="-1000" version="20061206"
thread="1234567890">
</pack>
<!-- Get Taiwan comments on Zero. It will still work even if you switch back to Harajuku -->
<packet>
<thread click_revision="0" user_id="123456"
@littlebtc
littlebtc / benchmark.rb
Created August 23, 2012 15:46
big5-ansiart: GD vs Cairo
require 'rubygems'
gem 'ansi_art'
require 'ansi_art'
require 'benchmark'
doc = AnsiArt::Document.new(IO.read('803.ans'))
Benchmark.bm(10) do |x|
x.report("GD2") { File.open('out.png', 'wb') { |f| f.write(doc.to_png) } }
x.report("Cairo") { doc.to_png_cairo(800, :path => 'out.cairo.png') }
end
// Copy the last line from this Gist, open the Error console (エラーコンソール),
// Paste the content to the empty text field then press Evaluate (コードを評価).
// it will test whether the VideoInfoReader works.
// You can replace the "sm9" URL with any Nico Nico Douga URLs.
// Possible result:
// Success: { /* A JSON response containing video info */ }
// Fail: (reason)
var VideoInfoReader = Components.utils.import("resource://nicofox/VideoInfoReader.jsm").VideoInfoReader; VideoInfoReader.readByUrl("http://www.nicovideo.jp/watch/sm9").then(function(msg) { Components.utils.reportError("Success:" + JSON.stringify(msg)); }, function(msg) { Components.utils.reportError("Fail:" + msg); });
@littlebtc
littlebtc / devise.zh-TW.yml
Created June 19, 2012 05:25 — forked from tomchentw/devise.zh-TW.yml
devise.zh-TW.yml
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
zh-TW:
errors:
messages:
expired: "已經過期,請重新申請一個"
not_found: "找不到"
already_confirmed: "已經驗證,請直接登入"
not_locked: "被鎖定了"
not_saved:
@littlebtc
littlebtc / .vimrc
Last active October 6, 2015 03:27
Littlebtc's .vimrc
" Vundle setup
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Valloric/YouCompleteMe'
Bundle 'kchmck/vim-coffee-script'
@littlebtc
littlebtc / Projects.md
Created May 29, 2012 14:38
Dream Linking Projects "聯營"

What is this?

Littlebtc 的個人計畫。每個計畫用一條台灣的公車路線表示。

Projects

Taipei