Skip to content

Instantly share code, notes, and snippets.

View geforester's full-sized avatar
🚀
Focusing

Roman Ilin geforester

🚀
Focusing
View GitHub Profile
@geforester
geforester / slideDown.js
Created June 16, 2020 22:22 — forked from ludder/slideDown.js
Vanilla JavaScript slideUp and slideDown functions
/*
Element to slide gets the following CSS:
max-height: 0;
opacity: 0;
overflow: hidden;
transition: max-height 0.4s ease 0s;
*/
/**
* Like jQuery's slideDown function - uses CSS3 transitions
<?xml version="1.0" encoding="utf-8"?>
<windows>
<window>
<available>1</available>
<color>белый</color>
<dimensions>Размеры</dimensions>
<title>Название</title>
<spec>Заполнение</spec>
<price>Цена</price>
<comment>Комментарий</comment>
(function (root, factory) {
'use strict'
/* global define */
if (typeof define === 'function' && define.amd) {
define([], factory)
} else if (typeof exports === 'object') {
module.exports = factory()
} else {
root.xorCrypt = factory()
}
(function (root, factory) {
'use strict'
/* global define */
if (typeof define === 'function' && define.amd) {
define([], factory)
} else if (typeof exports === 'object') {
module.exports = factory()
} else {
root.xorCrypt = factory()
}
// Удаление элемента из массива.
// String value: значение, которое необходимо найти и удалить.
// return: массив без удаленного элемента; false в противном случае.
Array.prototype.remove = function(value) {
var idx = this.indexOf(value);
if (idx != -1) {
// Второй параметр - число элементов, которые необходимо удалить
return this.splice(idx, 1);
}
@geforester
geforester / delete-files.ps1
Created May 10, 2017 20:37
Remove files on PowerShell by mask
Get-ChildItem "*].mp3" -recurse | foreach {$_.delete()}