This file contains 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
dig +short google.com | |
host google.com | |
nslookup google.com |
This file contains 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 int LED = 13; | |
const int PWR = 12; | |
char blueName[4] = "lazy"; | |
char pin[5] = "0000"; | |
char blueSpeed = "4"; | |
char mode = "1"; // 0 slave, 1 master | |
void setup() { | |
pinMode(LED, OUTPUT); |
This file contains 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
// keep track of the loaded libraries | |
const loadedLibraries = [] | |
function registerLibraryLoaded(id) { | |
// record the libs only if the array doesn't contain the same already | |
if (loadedLibraries.indexOf(id) < 0) { | |
loadedLibraries.push(id) | |
} | |
} |
This file contains 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
(function () { | |
var results, currentWindow, | |
// create an iframe and append to body to load a clean window object | |
iframe = document.createElement('iframe'); | |
iframe.style.display = 'none'; | |
document.body.appendChild(iframe); | |
// get the current list of properties on window | |
currentWindow = Object.getOwnPropertyNames(window); |
This file contains 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
// The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary | |
import videojs from 'video.js' | |
const Plugin = videojs.getPlugin('plugin') | |
const EVENTS = [ | |
'loadstart', | |
'progress', | |
'suspend', | |
'abort', | |
'error', |
This file contains 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
yarn add -D webpack webpack-cli webpack-dev-server babel-loader@next @babel/core @babel/preset-env @babel/preset-stage-0 html-webpack-plugin |
This file contains 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
function parseURL(url) { | |
// Assign resource as string | |
const parser = document.createElement('a') | |
parser.href = url | |
return { | |
// hash // == "#chiripiorca" | |
hash: parser.hash, | |
// host // == "www.chespirito.com:3000" | |
host: parser.host, |
This file contains 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
import React, { Component } from 'react' | |
import TodoList from './components/TodoList' | |
import TodoInput from './components/TodoInput' | |
import Filter from './components/Filter' | |
import './App.css' | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> |
This file contains 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
import React, { Component } from 'react' | |
import { BrowserRouter as Router, Route, Link } from 'react-router-dom' | |
import async from './components/async' | |
class App extends Component { | |
render() { | |
return ( | |
<Router> | |
<div> | |
<Route exact path="/" component={async(import('./pages/home')) } /> |
This file contains 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
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin' | |
import ExtractTextPlugin from 'extract-text-webpack-plugin' | |
import CompressionPlugin from 'compression-webpack-plugin' | |
import HtmlWebpackPlugin from 'html-webpack-plugin' | |
import autoprefixer from 'autoprefixer' | |
import webpack from 'webpack' | |
import path from 'path' | |
import PACKAGE from './package.json' |