Skip to content

Instantly share code, notes, and snippets.

Chriest Yu jcppman

Block or report user

Report or block jcppman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View TodoList.jsx
import { Component } from 'react';
import { withState, compose } from 'recompose';
import withTodos from './withTodos';
// let's assume these components exist
import TodoItem from './components/TodoItem';
import AddButton from './components/AddButton';
import InputBox from './components/InputBox';
// if in the future we need it elsewhere, maybe promote it to a global state
View ES2015Export.js
// Option 1
export { myFunc as getMe }
// Option 2
export const muffler = { HOLY: 'GRAIL' };
// Option 3
export default {
muffler: muffler,
gangster: 'Zup!',
@jcppman
jcppman / executor.js
Created Apr 15, 2015
mu-emitter exercise
View executor.js
define([ "./config", "when/when" ], function (config, when) {
"use strict";
var UNDEFINED;
var CALLBACK = config.callback;
var SCOPE = config.scope;
var HEAD = config.head;
var NEXT = config.next;
@jcppman
jcppman / diffconflicts
Last active Aug 29, 2015
a better vimdiff for git
View diffconflicts
#!/bin/bash
# A better vimdiff mergetool for Git
#
# Git does a great job resolving merge conflicts automatically but there are
# times when human intervention is still needed. Git resolves all the conflicts
# that it is able to and finally wraps each conflict it cannot resolve within
# special markers which must be resolved by a human.
#
# The vertical format and lack of syntax highlighting in the plain conflict
# marker layout makes it difficult to spot subtle conflicts such as
View copyMongo.fish
#!/usr/local/bin/fish
function tips
set_color red
echo $argv[1]
set_color normal
end
set SOURCE $argv[1]
set TARGET $argv[2]
@jcppman
jcppman / Supplementary.markdown
Last active Aug 29, 2015
IMP字幕组布告栏
View Supplementary.markdown

###硬规则

  • 人名、公司名保留原文 (课程大量出现“Shure”,让人非常想翻译成“舒尔”,请忍住 Orz)
  • 如果出现年代 (本课程出现年代的几率应该不高),保留后两位 + ,如果是1960s这种,直接翻xx年代,如:
    • 1983年 => 83年
    • 1959 => 59年
    • 1980s => 80年代
  • 出现缩写时,视频中第一次__出现时在括号里标注__中文,之后一律用英文缩写就ok,如:
    • DAW => 第一次: DAW (数字音频工作站) 尔后: DAW
  • 在Google Docs里编辑时,每一轴的格式都是一行轴编号、一行时间轴、一行到几行的英文,译文/校对意见等被添加到英文后面后__确保中文与下一行时间轴中间有一行空行__
  • 校对不使用Google Docs的建议功能,直接把你的建议或者修改后的译文添加在原译文下一行,并设为红色
View Larva.js
Larva.prototype.spawn = function larvaSpawn (addArgs) {
/*
* Some initialization, and arguments type checking,
* deleted for the 50 lines rule!
*/
process.nextTick(function () {
var child = spawn(command, args, {
env: env
@jcppman
jcppman / .vimrc
Last active Oct 9, 2019
My .vimrc
View .vimrc
if $SHELL =~ "bin/fish"
set shell=/bin/bash
endif
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
You can’t perform that action at this time.