Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 16, 2024 12:16
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ityonemo
ityonemo / test.md
Last active April 7, 2024 14:48
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active April 4, 2024 05:54
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active March 30, 2024 07:56
webRTC stun / turn server list
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,
@loilo
loilo / pass-slots.md
Last active March 27, 2024 20:58
Vue: Pass Slots through from Parent to Child Components

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 = {

@zolunx10
zolunx10 / .gitignore
Last active December 24, 2023 15:14
Rime用颜文字(及符号)字典. 个人都绑定到v键开头了, 请下载kaomoji*并酌情修改字典文件.dict.yaml; 另如果要在当前输入法中直接嵌入, 请参考luna_pinyin_simp.custom.yaml前半段修改您的输入法设置.
*
!.gitignore
!alternative.yaml
!*.custom.yaml
!kaomoji.*.yaml
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> {
@jayrbolton
jayrbolton / temperature-converter.js
Last active September 13, 2016 09:49
flyd + snabbdom component example (fahrenheit/celsius converter example)
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.