Skip to content

Instantly share code, notes, and snippets.

View arturparkhisenko's full-sized avatar
:octocat:
www. www always changes

Artur Parkhisenko arturparkhisenko

:octocat:
www. www always changes
View GitHub Profile
@arturparkhisenko
arturparkhisenko / windows-to-usb-on-macos.sh
Last active February 22, 2019 04:12
windows-to-usb-on-macos.sh
# download image here https://www.microsoft.com/en-us/software-download/windows10ISO
# mount it
diskutil list
# check identifier, it's could be like disk2
# format disk using identifier in the end
diskutil eraseDisk ExFat "WINDOWS10" MBR disk2
# copy all files from the image mounted
cp -rp /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WINDOWS10/
# WAY 2, (for image path - just grab iso and drag it into console)
@arturparkhisenko
arturparkhisenko / video.sh
Last active February 3, 2019 02:32
Video.sh
# This redirects the ffprobe help to a file
ffprobe -h > ffprobe_help.txt
# This creates a report next to your file
ffprobe -report SOMEFILE.mp4
# This creates your report as .json file next to your file
ffprobe -v quiet -print_format json -show_format -show_streams SOMEFILE.mp4 > ffprobe.json
@arturparkhisenko
arturparkhisenko / js-enum.js
Created January 26, 2019 01:23
js-enum.js
// https://twitter.com/rauschma/status/1088778137452924929
// TypeScript
enum Response {
No,
Yes
}
// JavaScript
const Response = Object.freeze({
@arturparkhisenko
arturparkhisenko / no-animations.css
Created January 12, 2019 02:16
pause js animations and disable css animations
/* https://dev.webonomic.nl/how-to-disable-css-transforms-transistions-and-animations */
*, :before, :after {
/*CSS transitions*/
transition-property: none !important;
/*CSS transforms*/
transform: none !important;
/*CSS animations*/
animation: none !important;
}
@arturparkhisenko
arturparkhisenko / full-width.css
Created November 10, 2018 01:47
full-width-css
/*
https://twitter.com/Una/status/951519740840873984
"Break out" of a parent's containing width to take the full screen of a page w/this nice utility class:
*/
.full-width {
width: 100vw;
position: relative;
left: 50%;
right: 50%;
@arturparkhisenko
arturparkhisenko / random-color.js
Created September 26, 2018 02:59
random-color.js
// https://twitter.com/jaffathecake/status/1038030104566358016?s=12
const hexColor = '#' +
Math.floor(Math.random() * 0x1000000)
.toString(16)
.padStart(6, '0');
@arturparkhisenko
arturparkhisenko / mediaevents-listener.js
Last active February 24, 2021 16:58
mediaevents listener
// https://html.spec.whatwg.org/multipage/media.html#mediaevents
const events = [
'loadstart',
'progress',
'suspend',
'abort',
'error',
'emptied',
'stalled',
'loadedmetadata',
# to start, you could repeat it up to x-cores/threads for example
yes > /dev/null &
# to stop
killall yes
@arturparkhisenko
arturparkhisenko / v8-bytecode.js
Last active February 8, 2018 19:07
Understanding V8’s Bytecode
// https://medium.com/dailyjs/understanding-v8s-bytecode-317d46c94775
// node --print-bytecode --print-bytecode-filter=ZXC v8-bytecode.js
function ZXC() {
var A = 0;
let B = 0;
const C = 0;
const O = {};
const N = 9;
@arturparkhisenko
arturparkhisenko / css-grid.css
Last active December 20, 2017 22:39
css-grid.css
/* -------------------------------------------------- */
/* https://twitter.com/wesbos/status/928731575684091904/photo/1 */
.wrapper {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-gap: 10px;
}
.sidebar {