Skip to content

Instantly share code, notes, and snippets.

View charlesBochet's full-sized avatar

Charles Bochet charlesBochet

View GitHub Profile
function computePi() {
var bigOne = new Big(1)
document.getElementById('pi').innerHTML =
((atan(bigOne.div(5)).times(4)).minus(atan(bigOne.div(239)))).times(4)
.toPrecision(100)
}
function atan(x) {
var preciseX = new Big(x);
var result = preciseX;
<!DOCTYPE html>
<html>
<head>
<title>Pi Calculator</title>
<style>
body {
background: #20262E;
padding: 20px;
font-family: Helvetica;
}
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
{
"/js/backoffice/backoffice.js": "/js/backoffice/backoffice.js",
"/js/backoffice/vendor.js": "/js/backoffice/vendor.js",
"/js/backoffice/manifest.js": "/js/backoffice/manifest.js",
"/js/customers/vendor.js": "/js/customers/vendor.js",
"/js/customers/customers.js": "/js/customers/customers.js",
"/js/customers/manifest.js": "/js/customers/manifest.js"
}
const mix = require('laravel-mix');
require('laravel-mix-merge-manifest')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
const mix = require('laravel-mix');
require('laravel-mix-merge-manifest')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
if (['customers', 'backoffice'].includes(process.env.npm_config_section)) {
require(`${__dirname}/webpack.${process.env.npm_config_section}.mix.js`)
} else {
console.log(
'\x1b[41m%s\x1b[0m',
'Provide correct --section argument to build command: customers, backoffice'
)
throw new Error('Provide correct --section argument to build command!')
}
"scripts": {
"dev-all": "concurrently \"npm --section=backoffice run dev\" \"npm --section=customers run dev\" --kill-others-on-fail",
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Backoffice</title>
</head>
<body>
<div class="flex-center position-ref full-height">
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Customers</title>
</head>
<body>
<div class="flex-center position-ref full-height">