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
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 } | |
); |
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
app.get('/characters', function (req, res) { | |
let mappedCharacters = []; | |
function mapResults(json){ | |
mappedCharacters.push(json); | |
return mappedCharacters; | |
} | |
function reducePages(pages){ | |
return pages.reduce((acc, curr) => |
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
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!'}); | |
}); |
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
// 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()}, |
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
const itemsById = itemsWithFields.reduce( | |
(accum, item) => { | |
const itemId = item.sys.id; | |
accum[itemId] = item; | |
return accum; | |
}, [] | |
); | |
console.log(itemsById); |
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
" 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' |
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
" 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 'w0rp/ale' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-fugitive' |
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
" This file should be at ~/.config/nvim/init.vim | |
call plug#begin('~/.nvim/plugged') | |
" Autocomplete list functionality | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'} | |
" Autocomplete with tern for JavaScript | |
Plug 'carlitux/deoplete-ternjs' | |
" Automatically handle swapfiles | |
Plug 'gioele/vim-autoswap' | |
" Keep list of yanks, use Ctrl-p to scroll through | |
Plug 'vim-scripts/YankRing.vim' |
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
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-sessionist' | |
set -g @plugin 'nhdaly/tmux-scroll-copy-mode' | |
set -g @plugin 'tmux-plugins/tmux-open' | |
set -g @plugin 'tmux-plugins/tmux-copycat' |