Skip to content

Instantly share code, notes, and snippets.

David Gilbertson davidgilbertson

  • Sydney, Australia
Block or report user

Report or block davidgilbertson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View eslint-config.json
"eslintConfig": {
"extends": ["react-app", "airbnb"],
"settings": {
"import/resolver": {
"node": {
"paths": ["src"]
}
}
}
},
View jsconfig.json
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
View auto-imports.jsx
import React from 'react';
import styles from './App.module.css';
import Button from 'components/Button/Button';
import { LINKS, STRINGS } from 'utils/constants';
function App() {
return (
<div className={styles.App}>
<Button>{STRINGS.HELLO}</Button>
<a href={LINKS.HELP}>Learn more</a>
View pasted-snippet.jsx
<Button>{STRINGS.HELLO}</Button>
<a href={LINKS.HELP}>Learn more</a>
View base-file.jsx
import React from 'react';
import styles from './App.module.css';
function App() {
return (
<div className={styles.App}>
</div>
);
}
View absolute-imports.jsx
import React from 'react';
import { LINKS, STRINGS } from 'utils/constants';
import Button from 'components/Button/Button';
import styles from './App.module.css';
function App() {
return (
<div className={styles.App}>
<Button>
{STRINGS.HELLO}
View relative-imports.jsx
import React from 'react';
import Button from '../../Button/Button';
import { LINKS, STRINGS } from '../../../utils/constants';
import styles from './App.module.css';
function App() {
return (
<div className={styles.App}>
<Button>
{STRINGS.HELLO}
View memory-snippet.js
const rawResults = await goGetResults();
const results = parseSortAndFilterResults(rawResults);
if (status === 'READY') {
render(results);
} else {
messages.on('ready', data => render(data.results));
}
View http-with-gzip.js
const http = require('http');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const PORT = 3001;
const STATIC_DIRECTORY = path.resolve(__dirname, '../build/');
const cache = {};
const getStaticFile = fileName => {
View package.json
{
"name": "fancy-logger",
"version": "0.1.0",
"permissions": {
"browser": ["network"],
"node": ["http", "fs"]
},
"etcetera": "etcetera"
}
You can’t perform that action at this time.