Разделы
Теги | RSS © 2008 – 2017
Контакты
email: igor@veselov.sumy.ua
skype: utz0r2
» » Страница 7

jakzal/phpqa - инструменты статического анализа PHP в докер контейнере


composer - Dependency Manager for PHP
box - An application for building and managing Phars
php-cs-fixer - PHP Coding Standards Fixer
phpcf - Finds usage of deprecated features
phpca - Finds usage of non-built-in extensions
phpdoc-to-typehint - Automatically adds type hints and return types based on PHPDocs
php-formatter - Custom coding standards fixer
phpmetrics - Static Analysis Tool
phpstan - Static Analysis Tool
phan - Static Analysis Tool
dephpend - Detect flaws in your architecture
psalm - Finds errors in PHP applications
phpDocumentor - Documentation generator
phpcpd - Copy/Paste Detector
phploc - A tool for quickly measuring the size of a PHP project
phpmd - A tool for finding problems in PHP code
phpmnd - Helps to detect magic numbers
pdepend - Static Analysis Tool
phpcs - Detects coding standard violations
phpcbf - Automatically corrects coding standard violations
phpcb - PHP Code Browser
phpa - Checks for weak assumptions
deprecation-detector - Finds usages of deprecated code
deptrac - Enforces dependency rules
phpda - Generates dependency graphs
php-coupling-detector - Detects code coupling issues
analyze - Visualizes metrics and source code
design-pattern - Dettects design patterns
parallel-lint - Checks PHP file syntax
php-semver-checker - Suggests a next version according to semantic versioning
https://github.com/jakzal/phpqa

rikschennink/fitty - js скрипт вписывает текст в блок по размеру


rikschennink/fitty - js скрипт вписывает текст в блок по размеру

https://github.com/rikschennink/fitty

xkeshi/image-compressor - js компрессор изображений


<input type="file" id="file" accept="image/*">
import axios from 'axios';
import ImageCompressor from 'image-compressor';

document.getElementById('file').addEventListener('change', (e) => {
  const file = e.target.files[0];

  if (!file) {
    return;
  }

  new ImageCompressor(file, {
    quality: .6,
    success(result) {
      const formData = new FormData();

      formData.append('file', result);

      // Send the compressed image file to server with XMLHttpRequest.
      axios.post('/path/to/upload', formData).then(() => {
        console.log('Upload success!');
      });
    },
    error(e) {
      console.log(e.message);
    },
  });
})

Работает на последних версиях браузеров
https://github.com/xkeshi/image-compressor

smallwins/spacetime - легковесный js скрипт для работы с timezone


API
var spacetime=require('spacetime')

// Some helpers
s = spacetime.now()
s = spacetime.today() // This morning
s = spacetime.tomorrow() // Tomorrow morning

// Date inputs
s = spacetime(1489520157) // Epoch
s = spacetime([2017, 5, 2]) // yyyy, m, d (zero-based months, 1-based days)
s = spacetime('July 2, 2017 5:01:00') // ISO

// Remotely understood date
s = spacetime(1489520157, 'Canada/Pacific')

// Get/set methods
s.date() // 14
s.year() // 2017
s.season() // Spring
s.hour(5) // Change to 5am
s.date(15) // Change to the 15th
s.day('monday') // Change to (this week's) monday
s.month('march') // Change to (this year's) March 1st
s.quarter(2) // Change to April 1st

// Add/subtract methods
s.add(1, 'week')
s.add(3, 'quarters')
s.subtract(2, 'months').add(1,'day')

// Timezone metadata
s.timezone().name // 'Canada/Eastern' (either inferred or explicit)
s.timezone().hemisphere // North
s.timezone().current.offset // -240 (in minutes)
s.timezone().current.isDst // True

// Comparisons
let d = spacetime([2017, 5, 2])

// gt/lt/equals
s.isAfter(d) // True
s.isEqual(d) // False
s.isBefore(d) // False

// Comparison by unit
s.isSame(d, 'year') // True
s.isSame(d, 'date') // False
s.diff(d, 'day') // 5
s.diff(d, 'month') // 0

// Date + time formatting
s.format('time') // '5:01am'
s.format('numeric-uk') // 02/03/2017
s.format('month') // 'April'
s.format('month-short') // 'Apr'

// Calendar-sensitive movement
s.startOf('day') // 12:00am
s.startOf('month') // 12:00am, April 1st
s.endOf('quarter') // 11:59:59pm, June 30th

// Percentage-based information
s.progress().month = 0.23 // We're a quarter way through the month
s.progress().day = 0.48   // Almost noon
s.progress().hour = 0.99  // 59 minutes and 59 seconds

// Misc functions
s.goto('Australia/Brisbane') // Roll into a new timezone, at the same moment
s.clone() // Make a copy
s.isValid() // Sept 32nd ? false

https://github.com/smallwins/spacetime

bestpractices.thecodingmachine.com/php - сайт со списком лучших практик программирования на php


bestpractices.thecodingmachine.com/php - сайт со списком лучших практик программирования на php
http://bestpractices.thecodingmachine.com/php/development_environment.html

tiza - скрипт стилизации кода в консоли браузера


tiza - скрипт стилизации кода в консоли браузера

https://github.com/pd4d10/tiza
«»
Вверх