while true; do nc ya.ru 80 && service network-manager restart; T=$(date '+%H:%m:%S'); echo "${T} restarting"; sleep 10; doneВместо service network-manager restart можно так же указать
nmcli networking off | // ==UserScript== | |
| // @name tinkoff_invert_events_csv | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-01-04 | |
| // @description Create a button "csv" for printing invest events into browser console as a csv | |
| // @author swvitaliy | |
| // @match https://www.tinkoff.ru/invest/portfolios/events/ | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=tinkoff.ru | |
| // @grant none | |
| // ==/UserScript== |
| build: | |
| g++ -std=c++14 -Wall -O2 -oa a.cpp | |
| naive: | |
| sudo perf stat -B -e cache-misses ./a n | |
| better: | |
| sudo perf stat -B -e cache-misses ./a b |
| const range = (arr, start, len) => { | |
| len = len || Math.max(0, arr.length - start); | |
| const end = Math.min(arr.length, start + len); | |
| return { | |
| current: start, | |
| length: len, | |
| next: function() { | |
| if (this.current >= end) return {done: true}; | |
| else return {done: false, value: arr[this.current++]}; | |
| }, |
| package main | |
| // | |
| // Print network interface information | |
| // | |
| import ( | |
| "fmt" | |
| "net" | |
| "strings" |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| namespace SpanBench | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| //BenchmarkRunner.Run<BenchmarkDemo1>(); |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Diagnostics; | |
| using gudusoft.gsqlparser; | |
| using System; | |
| public static class ParseSql | |
| { | |
| public class ColumnInfo | |
| { |
| DoctorScheduleExclusion: | |
| table: PL_EXCL | |
| properties: | |
| Id: | |
| column: PL_EXCL_ID | |
| OwnerType: | |
| column: OWNER_TYPE | |
| OwnerId: | |
| column: OWNER_ID | |
| Name: |
| --------------------------------------------------------------- | |
| user join 1 entity: | |
| QUERY PLAN | |
| |--SCAN fts1 VIRTUAL TABLE INDEX 32:M6 | |
| |--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?) | |
| `--SEARCH u USING INTEGER PRIMARY KEY (rowid=?) | |
| real 0m0,248s | |
| user 0m0,239s |
| --------------------------------------------------------------- | |
| 1 match: | |
| QUERY PLAN | |
| |--SCAN fts1 VIRTUAL TABLE INDEX 32:M5 | |
| |--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?) | |
| `--SEARCH u USING INTEGER PRIMARY KEY (rowid=?) | |
| real 0m0,173s | |
| user 0m0,158s |