Aquí veremos un pequeño ejemplo de como usar webpack2 + babel + sass
instalamos dependencias básicas
npm install [email protected] babel-core babel-preset-es2015 node-sass --save-dev
#!/bin/bash | |
#rename id3 album | |
#output file with "_.mp3" | |
for file in myfolder/*.mp3; do | |
ffmpeg -i $file -acodec copy -metadata album="Mysite.CoM" "$( sed -e's/\.mp3/_.mp3/g' <<< $file )" | |
# convert to 128kbps | |
#ffmpeg -i $file -ab 128k "$( sed -e's/\.mp3/_.mp3/g' <<< $file )" | |
done |
Aquí veremos un pequeño ejemplo de como usar webpack2 + babel + sass
instalamos dependencias básicas
npm install [email protected] babel-core babel-preset-es2015 node-sass --save-dev
<?php | |
header( "{$_SERVER['SERVER_PROTOCOL']} 503 Service Unavailable", true, 503 ); | |
header( "Retry-After: 3600" ); | |
?> | |
<h1>In Maintenance</h1> |
Test promise
describe('unittest', () => {
test('the data is peanut butter', () => {
function fetchData(){
return new Promise((resolve,reject)=>{
resolve('peanut butter');
});
}
expect.assertions(1);
task:
const fs = require('fs');
const param = process.env.page;
const webpackFile = './webpack.config.js';
const msgErr = (msg)=>{
console.log(msg);
process.exit();
}
regex valid js update 2021
const validEmail(str) => !/(\.{2}|-{2}|_{2})/.test(str) && /^[a-z0-9][a-z0-9-_\.]+@([a-z]|[a-z0-9]?[a-z0-9-]+[a-z0-9])\.[a-z0-9]{2,10}(?:\.[a-z]{2,10})?$/.test(str);
validEmail('[email protected]'); //true
validEmail('[email protected]'); //true
validEmail('[email protected]'); //true
validEmail('[email protected]'); // true (short domain)
validEmail('[email protected]'); // true (short domain)