Skip to content

Instantly share code, notes, and snippets.

View Santosl2's full-sized avatar
🎯
Focusing

Matheus Filype Santosl2

🎯
Focusing
View GitHub Profile
// --- Initialization ---
// Ensure the original functions are stored so we can call them
if (!window.originalDecodeStanza) {
window.originalDecodeStanza = require("WAWap").decodeStanza;
window.originalEncodeStanza = require("WAWap").encodeStanza;
}
/**
* Recursively walks through an object or array and decodes any Uint8Array
* placeholders it finds into JSON objects.
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
import rootReducer from '../my-rootreducer-dir';

function renderWithRedux(ui, { initialState, store = createStore(rootReducer, initialState) } = {}, renderFn = render) {
  const obj = {
    ...renderFn(<Provider store={store}>{ui}</Provider>),
    store,
  };
  obj.rerenderWithRedux = (el, nextState) => {