Skip to content

Instantly share code, notes, and snippets.

🙂
We'll get there

Brittan McGinnis konamax123

Block or report user

Report or block konamax123

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 keybase.md

Keybase proof

I hereby claim:

  • I am konamax123 on github.
  • I am brittanmcg (https://keybase.io/brittanmcg) on keybase.
  • I have a public key ASAHZsxjbXwXQUXeoU3frWeeYd5VesgKtEaHKcMpYe7ucAo

To claim this, I am signing this object:

@konamax123
konamax123 / npm.sh
Created Aug 20, 2018
Global npm -i
View npm.sh
# working with npm
npm install -g yarn
npm install -g npx
npm install -g np
npm install -g npm-name-cli
# debugging
npm install -g ndb
npm install -g node-inspector
View trippy.js
((d => {
var s = d.createElement('style')
d.head.appendChild(s)
s.sheet.insertRule('@keyframes s {from {transform:rotate(0deg);}to {transform:rotate(359deg);}}')
d.querySelectorAll('html *').forEach((e, i) => setTimeout(() => (e.style.animation = `s ${Math.pow(i, -1) * 1000 * 60}s infinite linear`), Math.random() * 10))
})(this.document))
@konamax123
konamax123 / .eslintrc
Created Sep 25, 2017
Airbnb eslint file
View .eslintrc
{
"extends": [
"airbnb",
"plugin:lodash-fp/recommended"
],
"parser": "babel-eslint",
"plugins": [
"lodash-fp"
],
"env": {
View usefulCommands.md
Keyboard Symbols
cmd
option
shift
Eclipse Shortcuts
⌘ + o List all available methods on current class
⌘ + pgup pgdown
@konamax123
konamax123 / lightbox.jsx
Created Feb 7, 2017
Lightbox implementation
View lightbox.jsx
import React from 'react';
import Lightbox from 'react-images';
import Button from '../Button';
const MyComponent = ReactCreateClass({
getInitialState() {
return {
lightboxIsOpen: false
};
@konamax123
konamax123 / threeTimeZones.json
Created Jan 30, 2017
3 different timezone accounts
View threeTimeZones.json
{
"company" : {
"name" : "Los Angeles",
"description" : "Company1`",
"address" : {
"street1" : "123 main st",
"city" : "San Diego",
"state" : "CA",
"zip" : "92101"
}
@konamax123
konamax123 / nav.js
Last active Jan 4, 2017
route switch statement
View nav.js
const fullLink = '/advertisers/accounts';
const route = '/advertisers/accounts/create';
const accountId = '1234a';
console.log(route === `${fullLink}/create`) // => true
let isActive;
switch (route) {
case route === fullLink:
isActive = true;
break;
case route === `${fullLink}/create`:
View gist:0098f329bf2bc7a11bcc
////////////////////////////////////////////////////////////////////////////////
// Excercise:
//
// http://facebook.github.io/react/docs/reusable-components.html#prop-validation
//
// - Don't access `USERS` directly in the app, use a prop
// - Validate Gravatar's `size` property, allow it to be a
// a number, or a string that can be converted to a number,
// ie: `size="asdf"` should warn (hint: parseInt)
// - in emailType, what if the prop name isn't email? what if we wanted
View request-body-1.json
{
"OfferID":876,
"OfferValues":[
{
"key":"first-name",
"value":"Some"
},
{
"key":"last-name",
"value":"Guy"
You can’t perform that action at this time.