Skip to content

Instantly share code, notes, and snippets.

View dongyuwei's full-sized avatar
💭
天天听儿歌

dongyuwei dongyuwei

💭
天天听儿歌
View GitHub Profile
@hisplan
hisplan / add-rsync-to-git-bash.md
Created February 21, 2018 09:02
Add rsync to git bash for windows
@cowboy
cowboy / mock-axios.js
Last active April 14, 2024 05:40
axios mocking via interceptors
import axios from 'axios'
let mockingEnabled = false
const mocks = {}
export function addMock(url, data) {
mocks[url] = data
}
@bbshih
bbshih / momentMock.js
Last active February 22, 2023 18:27 — forked from lededje/gist:44aeddf1dc2a5e6064e3b29dc35a7a2d
Jest Mocking Moment to same time zone for tests
// To mock globally in all your tests, add to setupTestFrameworkScriptFile in config:
// https://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string
jest.mock('moment', () => {
const moment = require.requireActual('moment-timezone');
moment.tz.setDefault('America/Los_Angeles'); // Whatever timezone you want
return moment;
});
@hamishrouse
hamishrouse / README.md
Last active March 8, 2024 18:30
Typescript, React and Video.js (VideoJS)
@dongyuwei
dongyuwei / create_snap_shots.rb
Created August 21, 2017 01:50
snapshot design for rails's ActiveRecord model
class CreateSnapShots < ActiveRecord::Migration[5.0]
def change
create_table :snap_shots do |t|
t.integer :user_id
t.string :table_name
t.text :table_data , limit: 4294967295
t.integer :table_id
t.integer :snapshot_id
t.timestamps
@morewry
morewry / monorepo-tool-comparison.md
Last active May 11, 2022 08:54
Comparison of Monorepo Tools For Web Client / Front End Projects (That Probably Use HTML, CSS, and JS)

Mono Repository Tool Comparison

For Web Client / Front End Projects

(That Probably Use HTML, CSS, and JS)

I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.

⚠️ Northbrook's author says the project is pretty dead and now uses Lerna.

Qualifications Wanted

@zkochan
zkochan / README.md
Last active November 2, 2021 05:40
Question on Gitter about pnpm hard links
@praveenpuglia
praveenpuglia / shadow-dom.md
Last active March 28, 2024 15:06
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

@inamiy
inamiy / SwiftElmFrameworkList.md
Last active March 11, 2024 10:20
React & Elm inspired frameworks in Swift

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

which packages does qtdb depend on?