- Download Fedora 26 iso, create a usb bootable media
- Use
diskutil list
to figure out which drive is the usb, on macbook pro with 1 hardrive, the usb is/dev/disk2
- Umount the disk using
diskutil unmountDisk /dev/disk2
or use Mac's Disk Utility (just umount, don't eject, umount removes it from directory structure and eject disconncet it altogether) - Use
dd
(a low levelcp
) to write iso content into the usb drive,sudo dd if=~/Downloads/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/rdisk2 bs=8m
, this will take a bit of time, make sure you wait until it's done, additionally compare the size or checksum to make sure all has been copied (not that necessary since if it weren't copied, it'll err at boot time) - Use Disk Utility to shrink Mac's harddrive to create partition for the subsequent fedora installation
- Boot to recovery mode (cmd+r) and disable SIP (termina
[Trigger] | |
Operation = Remove | |
Type = Package | |
Target = * | |
[Action] | |
Description = Clearing cache... | |
When = PostTransaction | |
Exec = /home/<user>/.local/bin/tools/removehook |
// | |
// MIT License | |
// | |
// Copyright (c) 2018 Ali Sharif | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
The error handling for async/await with try/catch always bugs me. Go to the rescue?
function to(promise) {
return promise
.then(res => [null, data])
.catch(err => [err])
}
async function doIt() {
#! /bin/bash | |
./bin/grav clear-cache | |
lftp -c "open \ | |
-u $FTP_USER,$FTP_PASSWORD $DEST_DOMAIN; \ | |
set ftp:ssl-allow off; \ | |
mirror -R ${HOME}/workspace/ $DEST_DIR \ | |
--exclude .git/ --exclude .c9/ --exclude backup/ \ | |
--delete" |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.
However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.
==================
- Obtain a windows vm from Modern IE.
- Win 8 OSX
curl -O -L "https://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE10-Win8.1&parts=5&filename=VMBuild_20131127/VirtualBox/IE10_Win8/Mac/IE10.Win8.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar,5.rar}"
## Print article date with a localized format. | |
############################################## | |
#set ($localeDefault = $localeUtil.getDefault()) | |
## Convert string (with a particular input format) to a Date object. | |
#set ($modifiedDate = $dateTool.toDate("EEE, dd MMM yyyy hh:mm:ss Z", $reserved-article-display-date.getData(), $localeDefault)) | |
## Get the localized format as a string. | |
#set ($dateFormat = "#language ('custom-medium-dateformat-pattern')") | |
$dateTool.format($dateFormat, $modifiedDate) | |
// I needed flatuicolors.com as Sass variables... | |
// In your console, run: | |
$('.color').get().map(function(el) { return "$" + el.classList[1] + ": " + el.getAttribute('data-clipboard-text') + ';' }).join('\r\n'); | |
// Output: | |
// $turquoise: #1abc9c; | |
// $emerland: #2ecc71; | |
// $peter-river: #3498db; | |
// $amethyst: #9b59b6; | |
// $wet-asphalt: #34495e; |