Skip to content

Instantly share code, notes, and snippets.

View elliotec's full-sized avatar
😎

Mike Elliott elliotec

😎
View GitHub Profile
// An All Components Screen is a great way to dev and quick-test components
import React from 'react'
import { View, ScrollView, Text, Image, NetInfo, TouchableOpacity } from 'react-native'
import DeviceInfo from 'react-native-device-info'
import { Metrics, Images } from './DevTheme'
import styles from './Styles/DeviceInfoScreenStyles'
const HARDWARE_DATA = [
{title: 'Device Manufacturer', info: DeviceInfo.getManufacturer()},
{title: 'Device Name', info: DeviceInfo.getDeviceName()},
const express = require('express');
const fetch = require('node-fetch');
const app = express();
const swapi = 'http://swapi.co/api';
app.set('view engine', 'ejs');
app.get('/', function (req, res) {
res.render('index', {heading: 'Hello Grow!'});
});
app.get('/characters', function (req, res) {
let mappedCharacters = [];
function mapResults(json){
mappedCharacters.push(json);
return mappedCharacters;
}
function reducePages(pages){
return pages.reduce((acc, curr) =>
componentDidMount() {
this.alignBreadcrumbs();
}
alignBreadcrumbs() {
if (this.breadcrumbSection.scrollWidth > this.breadcrumbSection.offsetWidth) {
this.breadcrumbSection.style.direction = 'rtl';
}
}
componentDidMount() {
window.addEventListener('scroll', this.throttleGoogleAdScroll());
}
throttleGoogleAdScroll() {
// listen and throttle the scroll every second at start and end of scroll
return _throttle(this.handleShowGoogleAdsense,
1000,
{ trailing: true, leading: true }
);
static handleShowGoogleAdsense() {
if (__CLIENT__ && (document.getElementById('adsTrigger').getBoundingClientRect().top) <= (window.innerHeight + 100)) {
console.log(this);
this.props.onShowGoogleAdSense();
}
}
componentDidMount() {
window.addEventListener('scroll', Product.handleShowGoogleAdsense);
}
import React, { PropTypes } from 'react';
import FeatureFlag from 'App/FeatureFlag/FeatureFlag';
import FeatureVariant from 'App/FeatureFlag/FeatureVariant';
const GoogleAdSense = ({
subcategoryName
}) => {
// On the off-chance CLIENT_ID changes, better to have here than in a config
const CLIENT_ID = 'partner-overstock-pdp';
// Width of ads will be the window width minus it's padding, or fallback to 300
2017-05-14 06:45:08,109:DEBUG:certbot.main:Root logging level set at 20
2017-05-14 06:45:08,110:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2017-05-14 06:45:08,111:DEBUG:certbot.main:certbot version: 0.12.0
2017-05-14 06:45:08,111:DEBUG:certbot.main:Arguments: ['--webroot', '--webroot-path=/srv/www/elliotec.com/', '-d', 'elliotec.com', '-d', 'www.elliotec.com', '--staging']
2017-05-14 06:45:08,111:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)
2017-05-14 06:45:08,112:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None
2017-05-14 06:45:08,112:DEBUG:certbot.plugins.selection:Single candidate plugin: * webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authenticator
" This file should be at ~/.config/nvim/init.vim
call plug#begin('~/.nvim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'}
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'carlitux/deoplete-ternjs'
Plug 'gioele/vim-autoswap'
Plug 'vim-scripts/YankRing.vim'
Plug 'ervandew/supertab'
Plug 'neomake/neomake'
" This file should be at ~/.config/nvim/init.vim
call plug#begin('~/.nvim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'}
Plug 'carlitux/deoplete-ternjs'
Plug 'gioele/vim-autoswap'
Plug 'vim-scripts/YankRing.vim'
Plug 'ervandew/supertab'
Plug 'neomake/neomake'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'