Skip to content

Instantly share code, notes, and snippets.

View afc163's full-sized avatar
🎃
Closing issues

afc163 afc163

🎃
Closing issues
View GitHub Profile
@PurpleBooth
PurpleBooth / truth-table.csv
Created September 3, 2018 10:13
Three process project plus WIP
Develop Current Task QA Current Task QA Older Task Release Current Task Release Older Task Release Even Older Task On Time
T T T T T T T
T T T T T F F
T T T T F T F
T T T T F F F
T T T F T T F
T T T F T F F
T T T F F T F
T T T F F F F
T T F T T T F
@andreashanft
andreashanft / gist:5116781
Created March 8, 2013 14:29
Handling output of a NSTask
NSTask* task = [[NSTask alloc] init];
{
[task setStandardOutput:[NSPipe pipe]];
[task setStandardError:[NSPipe pipe]];
[task setLaunchPath:...];
[task setArguments:...];
[task setTerminationHandler:^(NSTask* task)
{
if ([task terminationStatus] == 0)
{
@aoxu
aoxu / forward.sh
Created September 29, 2016 03:01
forward socks5 to http/https
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install privoxy
vim /usr/local/etc/privoxy/config
forward-socks5 / 127.0.0.1:1080 .
brew services start privoxy
export https_proxy=http://127.0.0.1:8118;export http_proxy=http://127.0.0.1:8118
@tejacques
tejacques / HOCBaseRender.tsx
Last active May 2, 2022 13:05
React Higher Order Components in TypeScript
import * as React from 'react';
import { Component } from 'react';
export default function HOCBaseRender<Props, State, ComponentState>(
Comp: new() => Component<Props & State, ComponentState>) {
return class HOCBase extends Component<Props, State> {
render() {
return <Comp {...this.props} {...this.state}/>;
}
}
@creamidea
creamidea / memorize.js
Last active July 14, 2022 15:26
函数式编程当中,缓存技巧叫做「记忆」(memorization),一阶乘函数。
function memorize(f) {
var cache = {};
// 这个函数是什么意思呢
// 就是使用闭包的特性,保留了cache的值
// 这值将间接使用上次调用时产生的值。下面例子中会详细讲解。
return function() {
console.log(cache); // 打印缓存值
// 这里的key就是一个签名档意思,也就是被缓存函数的参数
var key = Array.prototype.join.call(arguments, ',');
// console.log(key)
import React from 'react'
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Link from 'react-router/Link'
import Redirect from 'react-router/Redirect'
function elementInViewport(el) {
var top = el.offsetTop
var left = el.offsetLeft
var width = el.offsetWidth
@gefangenimnetz
gefangenimnetz / materialDesignShadowHelper.less
Last active December 17, 2022 17:21
Less css box-shadow helper for cards & modals according to Googles Material Design spec.
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
*
* Example usage:
@Kruemelkatze
Kruemelkatze / ! Theming Ant Design with Sass and Webpack.md
Last active April 5, 2023 13:25
Theming Ant Design with Sass and Webpack

Theming Ant Design with Sass and Webpack

This is a solution on how to theme/customize Ant Design (which is written in Less) with Sass and webpack. Ant itself offers two solutions and a related article on theming, but these are only applicable if you use Less, the antd-init boilerplate or dva-cli.

What this solution offers:

  • use a single sass-file to customize (no duplicate variables for your project and Ant)
  • hot reload compatibility
  • no dependencies on outdated npm modules
  • easy integration with your existing webpack setup (webpack 3+ tested)
Task Time required Assigned to Current Status Finished
Calendar Cache > 5 hours - in progress - [x] ok?
Object Cache > 5 hours - in progress [x] item1
[ ] item2
Object Cache > 5 hours - in progress
  • item1
  • item2
Object Cache > 5 hours - in progress
  • item1
  • item2
  • works
  • works too
@yyx990803
yyx990803 / frameworks.md
Created December 3, 2012 21:52
国内互联网公司的前端框架简介

百度:Tangram

基本上就是个百度版jQuery,2.0版本使用链式API,更像了。
配套的还有UI库Magic和模版引擎BaiduTemplate(和ejs很像)

腾讯:JX

理念在介绍里面写的很详细,代码清晰,注释丰富,可读性很好,但只有文档没有实例。
比较传统的大块头框架,本质上来说还是一堆工具方法和对象的堆积,提供了很基本的模块化的开发方式,但没有模块间的依赖关系支持。