Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
const AWS = require('aws-sdk'); | |
const Busboy = require('busboy'); | |
const BUCKET_NAME = ''; | |
const IAM_USER_KEY = ''; | |
const IAM_USER_SECRET = ''; | |
function uploadToS3(file) { | |
let s3bucket = new AWS.S3({ | |
accessKeyId: IAM_USER_KEY, |
import React from 'react'; | |
class ReducerComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
reducer = (state, action) => state; | |
dispatch = action => this.setState(state => this.reducer(state, action)); |
//npm init -y | |
//npm install --save puppeteer | |
//usage: node script.js /path/to/input.html /path/to/output.pdf | |
//script.js | |
const puppeteer = require('puppeteer'); | |
(async () => { | |
// Package preact provides bindings to the preact library. | |
package preact | |
import "github.com/gopherjs/gopherjs/js" | |
var preact = js.Global.Get("preact") | |
// Attrs of an element. | |
type Attrs map[string]interface{} |
package main | |
import "fmt" | |
type Thing interface { | |
coolify() | |
coolifyAndShout() | |
} | |
type CoolThing struct { |
import { h, Component } from 'preact'; | |
import Markup from 'preact-markup'; | |
import register from './preact-custom-element'; | |
// just a proxy component: WC -> Preact -> WC | |
const A = () => <x-b foo="initial foo from <x-a>" />; | |
// stateful component that can re-render | |
class B extends Component { | |
render(props, state) { |
package goexperiments | |
import ( | |
"context" | |
"net/http" | |
) | |
type HandlerMiddleware interface { | |
HandleHTTPC(ctx context.Context, rw http.ResponseWriter, req *http.Request, next http.Handler) | |
} |
laravel-new() { | |
if [ -z "$1" ]; then | |
cat << EOF | |
Please provide a directory name. | |
Usage: | |
laravel-new [directory-name] | |
EOF | |
return; |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js