Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Backbone.js Todos</title>
<link rel="stylesheet" href="todos.css"/>
</head>
<body>
<script src="../../test/vendor/json2.js"></script>
import '@testing-library/jest-dom/extend-expect'
import React from 'react'
import { render, RenderResult, fireEvent, wait, createEvent } from '@testing-library/react'
import axios from "axios"
import { Upload, UploadProps } from './upload'
jest.mock('axios')
const mockedAxios = axios as jest.Mocked<typeof axios>
jest.mock('../Icon/icon', () => {
@vikingmute
vikingmute / gist:67a2168f0a67f6b70defe4fb3cff1e5c
Created March 14, 2017 09:15
how to render two components based on one url
// hey, I wanna show Home Component & Modal Component when url is /edit-profile
// method one
<Route path="/" component={HomePage} />
<Route path="/edit-profile" component={EditModal} />
// this will work, but when I adding another route&component like below
// when go to '/about', both Home and About will show up, I assume these are two different pages
<Route path="/" component={HomePage} />
<Route path="/about" component={AboutPage} />
COME WIT IT NOW! 燥起来吧!
COME WIT IT NOW! 燥起来吧!
[Verse One]
The microphone explodes, shatterin the molds 麦克风在我手中爆裂, 声音撕碎虚伪的模式。
Either droppin hits like De La O or get the fuck off the commode 如果不像De La O(墨西哥革命领导者)那样勇敢发声 那我还不如现在就滚蛋
With the sure shot, sure to make the bodies drop 弹无虚发的瞄准 又一具横尸
Drop and don't copy yo, don't call this a co-opt 别想复制我的声音 还冠以团结之名
Terror rains drenchin, quenchin the thirst Of the power dons -that five sided Fist-agon 恐怖之雨浸透人民,只有这样五角大楼里面的“人物”才能够为自己的欲望止渴。
The rotten sore on the face of Mother Earth gets bigger 地球腐烂的伤口蔓延
kindOptions: [
{kind: "cosmetic"},
{kind: "dimensional"}
],
{
path: 'kind',
label: 'Kind',
optionLabelPath: 'content.kind',
choices: 'table.kindOptions',
<div class="agent-status status-light status-{{status}}"></div>
{{#if navToIndex}}
{{#link-to 'agents' class="agent-item-link"}}
<aid class="agent-item-header">{{agent.id}}</aid>
<component class={{if component.name 'agent-tag'}}>{{component.name}}</component>
<project class={{if project.name 'agent-tag'}}>{{project.name}}</project>
<address class={{if agent.addr 'agent-tag'}}>{{agent.addr}}</address>
<kind class={{if agent.kind 'agent-tag'}}>{{agent.kind}}</kind>
<model class={{if agent.model 'agent-tag'}}>{{agent.model}}</model>
<version class={{if agent.firmware 'agent-tag'}}>{{agent.firmware}}</version>
statusAgents: computed('search', 'isLoaded', 'agents', {
get() {
let agents = this.get('agents');
return agents.map(function(agent) {
if (agent.get('connected')) {
if (agent.get('currentJob')) {
agent.set('stauts', 'online');
} else {
agent.set('status', 'ready');
}

###2013总结 对于我来说 13年发生了很多事情 应该算是比较重要的一年

####生活

为了在上海买房 我在5月份领证 这是外地人在上海买房必须的东西 莎莎和我都是有个性的人 我们根本没把这事情放在心上 10月份 房子交付了 人生中的两件大事也算搞定了 打算14年办个简单的婚礼 时间不定 婚纱照没拍 这是莎莎的意思 我也的意思也是如此 幸福不用秀给别人看

####学习工作

5月份从携程离职 7月份开始在百度上班 在百度还是比携程学到的东西多 前端新的东西挺多 规范也很完整 js方面 也算是和最新的开发流程接轨了 用到了Grunt, LESS, AMD 之类的工具来开发产品和项目。自己学习了python,用到了django,flask来玩玩,完成自己的一些兴趣开发。很喜欢python,希望能继续学下去。上半年学习了一些node.js 用express做了一个小项目,后来就不想玩了。上半年在携程还学了一个hybrid web app的开发 主要是backbone,jQuery mobile,phonegap等,但是没有做完就离职了。

@vikingmute
vikingmute / gist:8235626
Created January 3, 2014 09:59
my sublime config
{
"theme": "Spacegray Eighties.sublime-theme",
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"font_face": "Source Code Pro",
"font_size": 12,
"ignored_packages":
[
"Vintage"
]
}