Skip to content

Instantly share code, notes, and snippets.

View andrewkslv's full-sized avatar

Andrew andrewkslv

  • World
View GitHub Profile
@andrewkslv
andrewkslv / the-bind-problem.jsx
Created November 18, 2016 12:47 — forked from Restuta/the-bind-problem.jsx
React, removeEventListener and bind(this) gotcha
/* Sometimes it's pretty easy to run ito troubles with React ES6 components.
Consider the following code: */
class EventStub extends Component {
componentDidMount() {
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind
}
componentWillUnmount() {
window.removeEventListener('resize', this.onResize.bind(this));
@andrewkslv
andrewkslv / Col.js
Created December 19, 2016 13:38 — forked from rosskevin/Col.js
material-ui `next` responsive layout/grid using JSS (originally based on flexboxgrid.com)
// @flow
import React, {Component, Element, PropTypes} from 'react'
import classNames from 'classnames'
import pure from 'recompose/pure'
import merge from 'lodash/merge'
import {createStyleSheet} from 'jss-theme-reactor'
import Logger from '../../util/Logger'
import {capitalizeFirstLetter} from '../../util/strings'
type DefaultProps = {
@andrewkslv
andrewkslv / .eslintrc.js
Created February 10, 2017 12:30 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@andrewkslv
andrewkslv / AppText.js
Created February 17, 2018 23:49 — forked from necolas/AppText.js
Localized typography with React Native
import i18n from '../../i18n';
import theme from '../../theme';
import { bool, string } from 'prop-types';
import { I18nManager, StyleSheet, Text } from 'react-native';
import React, { Component } from 'react';
/**
* React Component
*/
class AppText extends Component {
@andrewkslv
andrewkslv / Index.html
Created March 15, 2019 09:55 — forked from meziantou/Index.html
Javascript - Record audio
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1>Audio</h1>
@andrewkslv
andrewkslv / sources.list
Created November 17, 2020 21:05 — forked from ishad0w/sources.list
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse