This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto lo | |
iface lo inet loopback | |
allow-hotplug wlp3s0 | |
#auto wlp3s0 | |
# https://dzen.ru/a/XqPx4ouMe00kN1Wa | |
iface wlp3s0 inet static | |
address 192.168.1.100/24 | |
gateway 192.168.1.1 | |
netmask 255.255.255.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Отображение цены за вычетом кешбека | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-09-20 | |
// @description Упращает поиск реальной нижней цены, сортирует по реальной цене и отображает ее. | |
// @author You | |
// @match https://megamarket.ru/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=megamarket.ru | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Базовый ~/.gitconfig, для суб директорий можно подключить свои конфиги, например для личных и рабочик проектов | |
[filter "lfs"] | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
required = true | |
# extend and overwrite config for glob path | |
[includeIf "gitdir:~/www/**/*"] | |
path = ~/www/.gitconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
struct Message; | |
#[derive(Debug)] | |
struct Request<'a> { | |
body: &'a str, | |
method: &'a str, | |
uri: &'a str, | |
protocol: &'a str, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Gitlab config - gitlab.rb | |
# default configs from omnibus + custom options | |
# Nginx Proxy + SSL | |
external_url = 'https://gitlab.ex.ru' | |
# Registry | |
registry_nginx['enable'] = false # disable gitlab nginx registry proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func parseIpv4(s string) [4]byte { | |
var ip [4]byte | |
// первые три байта парсим | |
for i := 0; i < 3; i++ { | |
for p := 0; p < 4; p++ { | |
if s[p] == '.' { | |
number, _ := strconv.ParseUint(s[:p], 10, 8) | |
ip[i] = byte(number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$flat = [ | |
['id' => 1, 'parentId' => 0], | |
['id' => 2, 'parentId' => 0], | |
['id' => 3, 'parentId' => 1], | |
['id' => 4, 'parentId' => 1], | |
['id' => 5, 'parentId' => 2], | |
['id' => 6, 'parentId' => 2], | |
['id' => 7, 'parentId' => 3], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto click optmize map | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://yandex.ru/maps/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$response = new JsonResponse(['message' => 'ok'], 200, [ | |
'header-1' => 'via reponse' | |
]); | |
$emitter = new SapiEmitter; | |
ob_start(); | |
header('header-2: via global `header()` method'); // add header to buffer from global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"dev_value","db":"victoria","host":"server01","region":"us-west"},"values":[[1565948799,"NaN"],[1565948800,"NaN"],[1565948801,"NaN"],[1565948802,"NaN"],[1565948803,"NaN"],[1565948804,"NaN"],[1565948805,"NaN"],[1565948806,"NaN"],[1565948807,"NaN"],[1565948808,"NaN"],[1565948809,"NaN"],[1565948810,"NaN"],[1565948811,"NaN"],[1565948812,"NaN"],[1565948813,"NaN"],[1565948814,"NaN"],[1565948815,"NaN"],[1565948816,"NaN"],[1565948817,"NaN"],[1565948818,"NaN"],[1565948819,"NaN"],[1565948820,"NaN"],[1565948821,"NaN"],[1565948822,"NaN"],[1565948823,"NaN"],[1565948824,"NaN"],[1565948825,"NaN"],[1565948826,"NaN"],[1565948827,"NaN"],[1565948828,"NaN"],[1565948829,"NaN"],[1565948830,"NaN"],[1565948831,"NaN"],[1565948832,"NaN"],[1565948833,"NaN"],[1565948834,"NaN"],[1565948835,"NaN"],[1565948836,"NaN"],[1565948837,"NaN"],[1565948838,"NaN"],[1565948839,"NaN"],[1565948840,"NaN"],[1565948841,"NaN"],[1565948842,"NaN"],[1565948843,"NaN"],[156594884 |
NewerOlder