This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { store } from './index'; | |
export const hijackConsole = () => { | |
const OG_LOG = console.log; | |
console.log = function(...args) { | |
// map over arguments and convert | |
// objects in to readable strings | |
const messages = [...args].map(msg => { | |
return typeof msg !== 'string' | |
? JSON.stringify(msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { store } from './fileWhereStoreLives'; | |
// add this code in your app's entry point file to | |
// set localStorage when navigating away from app | |
window.onbeforeunload = function(e) { | |
const state = store.getState(); | |
localStorage.setItem( | |
'local-storage-key', | |
JSON.stringify(state.stateYouWantToPersist) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
... | |
a bunch of other code | |
... | |
*/ | |
const defaultState = { | |
height: 600, | |
isMapPaneHidden: false, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
To show the true results of a join, we'd have to break SQL convention and not repeat column names across multiple tables. Rows are expressed as Objects, so if you are trying to join the following tables with the following columns:
orders_table
id customer_id stock_id
customers_table
id address state
stocks_table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AuraValueBinding": { | |
"prefix": "aura:vb", | |
"body": [ | |
"\"{!$0}\"" | |
], | |
"description": "Aura value binding" | |
}, | |
"AuraIteration": { | |
"prefix": "aura:iteration", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.HttpLogging; | |
using Microsoft.OpenApi.Models; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddHttpContextAccessor(); | |
builder.Services.AddEndpointsApiExplorer(); | |
builder.Services.AddHttpLogging(opts => |