Skip to content

Instantly share code, notes, and snippets.

@loilo
loilo / pass-slots.md
Last active Jun 21, 2021
Vue: Pass Slots through from Parent to Child Components
View pass-slots.md

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }
    
    const B = {
View ReactiveReactComponent.ts
import * as React from 'react'
import {Observable} from 'rxjs/Observable'
import {Subject} from 'rxjs/Subject'
import {ISubscription} from 'rxjs/Subscription'
import {Observables} from '../rxjs/Observables'
import {Pipes} from '../rxjs/Pipes'
import {Subjects} from '../rxjs/Subjects'
import {EventHandlers} from '../utils/EventHandler'
export abstract class ReactiveReactComponent<Props, State, Events> extends React.Component<Props, State> {
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active Jun 23, 2021
webRTC stun / turn server list
View gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@jayrbolton
jayrbolton / temperature-converter.js
Last active Sep 13, 2016
flyd + snabbdom component example (fahrenheit/celsius converter example)
View temperature-converter.js
import flyd from 'flyd'
import h from 'snabbdom/h'
import snabbdom from 'snabbdom'
import render from 'ff-core/render'
// Initialize the state object
const init = ()=> {
// Initialize input change event streams
// Think of streams as values that change over time.
// These two streams are input values that change over time, but start empty.
@zolunx10
zolunx10 / .gitignore
Last active Feb 20, 2021
Rime用颜文字(及符号)字典. 个人都绑定到v键开头了, 请下载kaomoji*并酌情修改字典文件.dict.yaml; 另如果要在当前输入法中直接嵌入, 请参考luna_pinyin_simp.custom.yaml前半段修改您的输入法设置.
View .gitignore
*
!.gitignore
!alternative.yaml
!*.custom.yaml
!kaomoji.*.yaml
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname