Skip to content

Instantly share code, notes, and snippets.

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info

@joskid
joskid / gist:e30b8a4a70ecb212d587c2a3a44007ca
Created August 29, 2020 13:47 — forked from learncodeacademy/gist:8acf7e3a2c4c33100f04c6715c662a01
Training a Neural Network - Enhanced Console Output From Brain.js
Start Training!...Here's the data, we'll do 2 iterations:
[ { input: [ 0, 1 ], output: [ 1, 0 ] },
{ input: [ 1, 1 ], output: [ 1, 1 ] } ]
======== TRAINING ITERATION 1 =========
--------- Run input set 0: 0,1 ----------
-> Layer 2 has 3 nodes
START NODE: 0
-> bias for node 0: 0.13861538469791412
-> weights for node 0:
-> input value: 0, weight: -0.03485306352376938
@joskid
joskid / App.js
Created August 5, 2020 16:34 — forked from rehrumesh/App.js
App.js of Cats application
import React from "react";
import { Router, Route } from "react-router-dom";
import { createBrowserHistory } from "history";
import GreetingCat from "./GreetingCat";
import RandomCat from "./RandomCat";
import "./App.css";
const defaultHistory = createBrowserHistory();
function App({ history = defaultHistory }) {
@joskid
joskid / map.js
Created August 3, 2020 14:52 — forked from velocity-360/map.js
// don't forget google maps import:
// <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC44mPpaMNvENXryYjHBHzjST1UMnYlARk"></script>
import React, { Component } from 'react'
import { withGoogleMap, GoogleMap, Marker } from 'react-google-maps'
class Map extends Component {
constructor(){
super()
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Putting User Input into JS Objects</title>
<style>
.formBox{
padding: 0.5rem 2rem;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>FormData Objects</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
html {
font-size: 20px;
font-weight: 300;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
:root{
--font: 1rem;
--line: calc(var(--font) * 2);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS Classes vs Ids</title>
<style>
* {
box-sizing: border-box;
padding: 0;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scroll To Text Fragment</title>
<style>
* {
box-sizing: border-box;
}