Skip to content

Instantly share code, notes, and snippets.

View amowu's full-sized avatar

Amo Wu amowu

View GitHub Profile
Channel ![test][test]
Chrome for Testing
stable
Chrome Stable
beta
Chrome Beta
dev
Chrome Dev
![canary][canary]
Chrome Canary
特點 特製版本,不自動更新,包含所有 Chrome Stable 功能 針對大眾使用者,功能穩定可靠 即將成為 Stable 版本的測試版,功能相對穩定 | 最新功能和修復,每週更新一次 最實驗性的版本,每天更新,包含所有最新功能和修復
更新頻率 不定期 每月 每四至六週 每週 每天
適用對象 測試工程師、開發人員 所有人 UX/UI 團隊、開發團隊 工程團隊、開發人員 開發者、測試人員
主要用途 自動化瀏覽器測試 日常瀏覽使用、確保穩定性 提前預見即將發佈的功能和變化 測試最新功能和 API,提前適應變化 是用最新的 Chrome 功能和 API,進行實驗性測試
@amowu
amowu / brew-perms.sh
Created July 10, 2018 17:20 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@amowu
amowu / getAllCommits$.js
Last active October 22, 2018 08:42
GitHub API pagination with RxJS
const GitHubApi = require("github");
const Rx = require("rx");
const github = new GitHubApi();
const getCommitsAsync = (param) => github.repos.getCommits({
owner: 'amowu',
repo: 'test-semantic-release',
...param
});
export default function localitySelect(action$, store, { ajax }) {
return action$
.ofType('LOCALITY_AUTOCOMPLETE')
.debounceTime(150)
.distinctUntilChanged()
.switchMap(({ payload: { text, cursor } }) => {
return ajax
.getJSON(
`${api.searchSuggest}&cursor=${cursor}&string=${text}`
)
const plugins = [
// extract vendor and webpack's module manifest
new webpack.optimize.CommonsChunkPlugin({
names: [ 'vendor', 'manifest' ],
minChunks: Infinity
}),
// extract common modules from all the chunks (requires no 'name' property)
new webpack.optimize.CommonsChunkPlugin({
async: true,
children: true,
@amowu
amowu / responsiv-font.scss
Created April 26, 2017 14:40
响应式的字体大小的计算公式
$min-font-size: 16px;
$max-font-size: 24px;
$min-screen-size: 400px;
$max-screen-size: 800px;
font-size: calc($min-font-size + ($max-font-size - $min-font-size) * (100vw - $min-screen-size) / ($max-screen-size - $min-screen-size));
@amowu
amowu / theme.js
Created March 30, 2017 20:12 — forked from carl0zen/theme.js
Global Theme
export const theme = {
color: {
primary: "#47C51D",
secondary: '#53C1DE',
white: "#FFF",
black: "#222",
border: "rgba(0,0,0,0.1)",
base: "rgba(0,0,0,0.4)",
alert: '#FF4258',
success: 'mediumseagreen',
import styled from "styled-components";
import {
theme,
borderProps,
sizeProps,
backgroundColorProps,
marginProps
} from "ui";
const { color, font, topbar, gutter } = theme;
// Mixin like functionality
const textInput = props => `
color: ${props.error ? color.white : color.base};
background-color: ${props.error ? color.alert : color.white};
`;
export const Input = styled.input`
${textInput}
`;
// Prop passing Shorthands for Styled-components
export const borderProps = props => css`
${props.borderBottom && `border-bottom: ${props.borderWidth || "1px"} solid ${color.border}`};
${props.borderTop && `border-top: ${props.borderWidth || "1px"} solid ${color.border}`};
${props.borderLeft && `border-left: ${props.borderWidth || "1px"} solid ${color.border}`};
${props.borderRight && `border-right: ${props.borderWidth || "1px"} solid ${color.border}`};
`;
export const marginProps = props => css`
${props.marginBottom && `margin-bottom: ${typeof (props.marginBottom) === "string" ? props.marginBottom : "1em"}`};