Skip to content

Instantly share code, notes, and snippets.

@max107
max107 / Regions.json
Created September 15, 2013 14:19
Russia regions with coords. Регионы россии с координатами границ.
{
"Алтайский край": {
"0": [
[
54.469437,
85.079468
],
[
54.195824,
85.44720500000001
@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 / 0_reuse_code.js
Created January 26, 2014 16:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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',
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
use epoll;
multi_accept on;
}