Skip to content

Instantly share code, notes, and snippets.

View 98o718's full-sized avatar
💭
🍝

Max Kalyakin 98o718

💭
🍝
  • TradingView
  • Georgia
View GitHub Profile
@98o718
98o718 / aml-upgrade-package-extract.c
Created April 24, 2021 10:38 — forked from denji/aml-upgrade-package-extract.c
Utility to extract AMLogic "USB Burning Tool" .IMG firmware for Linux
// gcc aml-upgrade-package-extract.c -o aml-upgrade-package-extract
// ./aml-upgrade-package-extract update-usb-burning-mode.img
// /dev/sdX - fat32 sdcard
// Make bootable Android update:
// dd if=aml_sdc_burn.UBOOT bs=1 count=442 of=/dev/sdX
// dd if=aml_sdc_burn.UBOOT seek=1 skip=1 bs=512 of=/dev/sdX
// sync
@98o718
98o718 / file-input-value.js
Last active March 16, 2018 13:11
File input button value
// File input button value
// HTML
<input type="file" multiple class="input input--hidden input--add-images" id="add-images" accept="image/*">
<label class="input input--label input--label-for-add-images input--dark" for="add-images">Выберете файл</label>
// JS
function fileInputValue(input, label){
@98o718
98o718 / textarea.js
Created March 16, 2018 10:02
Autoheight textarea with "textarea" class
$('.textarea').each(function () {
this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');
}).on('input', function () {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});