var processors = {
'css': ['scss', 'css'], // run the css processor on .scss and .css files
'html': ['haml'], // run the html processor on .haml files
'js-strings': ['js'] // run the js-strings plugin on js files
},
ignores = {
classes: ['hidden', 'active'] // ignore these class selectors,
ids: '*' // ignore all IDs
};
gs.run(processors, ignores);
https://www.npmjs.com/package/gulp-selectors и не забываем про
Обзор полезных gulp плагинов
swarm-numberformat - скрипт форматирования больших числ
numberformat.format(1e10) // or {format: 'standard'}
// => "10.000 billion"
numberformat.format(1e10, {format: 'scientific'})
// => "1.0000e10"
numberformat.format(1e10, {format: 'engineering'})
// => "10.000E9"
numberformat.format(1e10, {format: 'longScale'})
// => "10.000 milliard"
https://github.com/erosson/swarm-numberformat
import { frames, ease } from 'animationframes';
const translate = (x, y) => `translate(${x}%, ${y}%)`;
const el = document.createElement('h1');
const animation = frames(0, 1000)
.start(() => {
el.style.transform = translate(-100, 0);
})
.progress((t) => {
const e = ease.quartInOut(t);
const x = -100 * (1 - e);
el.style.transform = translate(x, 0);
})
.end(() => {
el.style.transform = '';
});
el.textContent = 'Hello world!';
document.body.appendChild(el);
https://github.com/pakastin/animationframes
https://github.com/luisvinicius167/ityped
Mp3Info - получение мета тегов из mp3 файла
use wapmorgan\Mp3Info\Mp3Info;
$audio = new Mp3Info($fileName, true);
// or omit 2nd argument to increase parsing speed
$audio = new Mp3Info($fileName);
echo 'Audio duration: '.floor($audio->duration / 60).' min '.floor($audio->duration % 60).' sec'.PHP_EOL;
echo 'Audio bitrate: '.($audio->bitRate / 1000).' kb/s'.PHP_EOL;
https://github.com/wapmorgan/Mp3Info
medoo - PDO обертка на PHP
// If you installed via composer, just use this code to requrie autoloader on the top of your projects.
require 'vendor/autoload.php';
// Or if you just download the medoo.php into directory, and require it with the correct path.
require_once 'medoo.php';
// Initialize
$database = new medoo([
'database_type' => 'mysql',
'database_name' => 'name',
'server' => 'localhost',
'username' => 'your_username',
'password' => 'your_password',
'charset' => 'utf8'
]);
// Enjoy
$database->insert('account', [
'user_name' => 'foo',
'email' => '[email protected]',
'age' => 25,
'lang' => ['en', 'fr', 'jp', 'cn']
]);
http://medoo.in/