- Я опытный пользователь linux, но никогда не стояло задачи разобраться как оно работает изнутри, про большую часть системных вызовов не расскажу.
- Я понимаю как работает многопоточность, какие там подводные камни, очень аккуратно подхожу к написанию такого кода,предварительно перечитывая доки.
- Я умею пользоваться виртуалками как оператор; по-наитию понимаю, как это работает.
- Не могу свободно предсказывать алгоритмы работы Go sheduler, не знаю нюансов как то, что горутина при context switch может менять поток. Про context switch стоит получше почитать даже для FreeRTOS.
- Очень мало всякого кода писал с каналами; надо зазубрить теорию, а то каждый раз неловко.
- Мое знание HTTPS заканчивается на том, что это HTTP с шифрованием, и API для поднятия такого сервера просит ключ для шифрования. Также знаю, что HTTPS2 ‒ совсем другой протокол с кучей нюансов. Статью на вики можно в теории зазубрить, но не буду без необходимости, т.к. на практике в приватной сети летает HTTP или
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
#!/usr/bin/python | |
import urllib.request | |
import json | |
import time | |
def get(url, headers={}): | |
req = urllib.request.Request(url, headers=headers) | |
with urllib.request.urlopen(req) as f: | |
return json.loads(f.read().decode('utf-8')) |
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
from pylibftdi import BitBangDevice, Bus | |
import time | |
with BitBangDevice() as bb: | |
bb.baudrate = 60 | |
bb.direction = 0xFF | |
bb.port = 0x00 | |
i = 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"reflect" | |
"time" |
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
job "scope-agent" { | |
type = "system" | |
datacenters = ["dc1"] | |
group "scope-agent" { | |
task "scope-agent" { | |
driver = "docker" | |
config { | |
image = "weaveworks/scope:1.13.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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"regexp" | |
"time" |
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
const { exec } = require('child_process'); | |
const view = ` | |
<pre style="height:300px; overflow: auto; border: 1px solid #eee" id="history"> | |
</pre> | |
<form method="post" id="form"> | |
<input type="text" name="command" size="100" id="command" /> | |
<button>Run</button> | |
</form> | |
<script> |
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
[defaults] | |
inventory = hosts | |
pipelining = True | |
timeout = 30 |
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
module Main exposing (..) | |
import Browser | |
import Html exposing (Html, button, div, text) | |
import Html.Events exposing (onClick) | |
import Random | |
main : Program () Model Msg | |
main = | |
Browser.element { init = \_ -> init, update = update, view = view, subscriptions = \_ -> Sub.none } |
NewerOlder