Skip to content

Instantly share code, notes, and snippets.

@max107
max107 / lvm-cache-fedora.md
Created September 11, 2020 15:32 — forked from gabrieljcs/lvm-cache-fedora.md
Instructions to create an LVM cache for root in Fedora

LVM cache in Fedora

From the man-pages: "The cache logical volume type uses a small and fast LV to improve the performance of a large and slow LV. It does this by storing the frequently used blocks on the faster LV. LVM refers to the small fast LV as a cache pool LV. The large slow LV is called the origin LV. Due to requirements from dm-cache (the kernel driver), LVM further splits the cache pool LV into two devices - the cache data LV and cache metadata LV. The cache data LV is where copies of data blocks are kept from the origin LV to increase speed. The cache metadata LV holds the accounting information that specifies where data blocks are stored (e.g. on the origin LV or on the cache data LV). Users should be familiar with these LVs if they wish to create the best and most robust cached logical volumes. All of these associated LVs must be in the same VG."

Assuming LVM is already setup in HDD (e.g. from anaconda) and SSD is untouched.

Create a physical

@max107
max107 / sphp
Created January 13, 2019 12:06
sphp for 7.0 without apache
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller, Maxim Falaleev
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("7.0","7.1","7.2", "7.3")
php_array=("php@7.0" "php@7.1" "php@7.2" "php@7.3")
valet_support_php_version_array=("php@7.0" "php@7.1" "php@7.2" "php@7.3")
php_installed_array=()
php_version="php@$1"
__
/ _)
_/\/\/\_/ /
_| /
_| ( | ( |
/__.-'|_|--|_|
__
/ _)
_.----._/ /
/ /
-apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif
@max107
max107 / .gitignore
Created September 21, 2016 21:33 — forked from Ocramius/.gitignore
`Zend\EventManager` examples
vendor
composer.lock
@max107
max107 / fly.js
Created June 1, 2016 15:12
fly.js
import $ from 'jquery';
export default (src, dst) => {
let divider = 3,
$src = $(src),
$dst = $(dst),
$srcClone = $($src.clone());
$srcClone.css({
'position': 'absolute',
@max107
max107 / tmux-cheatsheet.markdown
Created December 23, 2015 08:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@max107
max107 / qwe.jsx
Created November 26, 2015 08:54
qwe.jsx
import React from 'react';
import $ from 'jQuery';
class Alert extends React.Component {
render() {
return (
<div className='alert'>alert</div>
)
};
}
class Alert extends React.Component {
render() {
return (
<div className='alert'>alert</div>
)
};
}
class Header extends React.Component {
render() {
return (
@max107
max107 / modal.jsx
Created November 24, 2015 09:28
modal react
var Modal = React.createClass({
killClick: function(e) {
// clicks on the content shouldn't close the modal
e.stopPropagation();
},
componentDidMount: function() {
ModalCount += 1;
modalWindowLock();
},
handleBackdropClick: function() {