Help
RSS
API
Feed
Maltego
Contact
Domain > devrandom.eu
×
Welcome!
Right click nodes and scroll the mouse to navigate the graph.
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2024-08-17
109.74.192.97
(
ClassC
)
Port 443
HTTP/1.1 200 OKcache-control: public, max-age3600, stale-while-revalidate86400, immutabledate: Sat, 17 Aug 2024 06:15:52 GMTcontent-type: text/html; charsetutf-8transfer-encoding: chunkedstrict-transport-security: max-age31536000 !doctype html>html>head>meta http-equivContent-Type contenttext/html; charsetUTF-8 />link relstylesheet typetext/css mediascreen href/s/css/style.css />title>/dev/random/title>meta nameviewport contentwidthdevice-width, initial-scale1>meta namekeywords contentgolang,linux,rust />meta namedescription contentTech musings of random hacker />meta namegenerator contentBlogolicious />link relalternate typeapplication/atom+xml titleAtom href/blog/feed />script>function setFontStyle(title) { var i, a, main; document.documentElement.setAttribute(x-font-style, title); window.localStorage.setItem(font-style,title);}setFontStyle(window.localStorage.getItem(font-style));/script>/head>body classdark>div classwrapper>header classheader> a href/>h1>/dev/random/h1>/a>h4>Tech musings of random hacker/h4>br>a hrefhttps://github.com/XANi/ target_blank relnoopener>svg xmlnshttp://www.w3.org/2000/svg width24 height24 viewBox0 0 24 24 fillnone strokecurrentColor stroke-width2 stroke-linecapround stroke-linejoinround classicon icon-github> title>github/title> path dM9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22>/path>/svg>/a>br>/header>article classmain> span classpost-title>a href/blog/post/2022-11-03_splitting_stereo_input_into_mono_in_pulseaudio relbookmark titleSplitting stereo input into mono in Pulseaudio> Splitting stereo input into mono in Pulseaudio /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/linux>linux/a> #a classpost-tag href/blog/tag/pulseaudio>pulseaudio/a> /span> span classpost-date> | 2022-11-03 (modified 2022-11-09 ) /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>p>My recently-bought Behringer UMC204HD audio interface, that is advertised as 2 inputs, 4 outputs, presents itself to Linux as one stereo input channel and one 4.0 output channel:/p>pre classchroma>span classln> 1/span>pacmd list-sinks |grep -P 'name: \<|channel map' -C 1span classln> 2/span>...span classln> 3/span> index: 2span classln> 4/span> name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>span classln> 5/span> driver: <module-alsa-card.c>span classln> 6/span>--span classln> 7/span> sample spec: s16le 2ch 44100Hzspan classln> 8/span> channel map: front-left,front-rightspan classln> 9/span> Stereospan classln>10/span>...span classln>11/span>pacmd list-sources |grep -P 'name: \<|channel map' -C 1span classln>12/span>...span classln>13/span> index: 2span classln>14/span> name: <alsa_input.usb-BEHRINGER_UMC204HD_192k-00.analog-stereo>span classln>15/span> driver: <module-alsa-card.c>span classln>16/span>--span classln>17/span> sample spec: s32le 2ch 44100Hzspan classln>18/span> channel map: front-left,front-rightspan classln>19/span> Stereospan classln>20/span>span classln>21/span>.../pre>p>Im guessing the reason is plain "we just use some generic USB ADC/DAC chip and reference implementation comes in that config"./p>p>That poses a problem for most voice communication software, usually putting stereo input into it means it will sum both channels up, and summing a channel with signal to channel with zero signal results in volume drop (-6db usually)./p>p>Some software is competent enough to auto-gain out of that problem, but most dont even have VU meter, let alone any indication of sound level youre sending to other participants of the conversation so its easy to be too quiet in out of the box config./p>p>So we need to split one device into two. We might still em>occasionally/em> want the stereo input so I wont try to replace it with two mono ones./p> /div> a href/blog/post/2022-11-03_splitting_stereo_input_into_mono_in_pulseaudio classread-more>Read More/a> br>br> hr> span classpost-title>a href/blog/post/2022-04-28-setting_i2c_speed_on_raspberry_pi_4_on_newer_kernels relbookmark titleSetting I2C speed on Raspberry Pi 4 on newer kernels> Setting I2C speed on Raspberry Pi 4 on newer kernels /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/Linux>Linux/a> #a classpost-tag href/blog/tag/rPi>rPi/a> /span> span classpost-date> | 2022-04-28 /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>h1 idwhy-change-clock-speed>Why change clock speed/h1>p>So why you would want to change speed of your I2C interface?/p>p>You might just need to probe your sensors more often./p>p>You might also want to get around long standing a hrefhttp://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html relnoreferrer noopener>I2C stretching bug/a>,which caused that by default I2C stretching on rPi I2C controller is disabled./p> /div> a href/blog/post/2022-04-28-setting_i2c_speed_on_raspberry_pi_4_on_newer_kernels classread-more>Read More/a> br>br> hr> span classpost-title>a href/blog/post/2022-02-27_increasing_system_robustness_with_systemd_dependencies relbookmark titleIncreasing system robustness with systemd dependencies> Increasing system robustness with systemd dependencies /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/systemd>systemd/a> #a classpost-tag href/blog/tag/Linux>Linux/a> /span> span classpost-date> | 2022-02-27 /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>p>in this post we will look at how systemd handles dependencies and how they can be used to increase the robustness of the system, and also discuss potential pitfalls./p>p>For the existing services all of the examples should be put in code>/etc/systemd/system/<service you change>.d/<override>.conf/code>,as this way you will only override the things you change in unit, instead of editing whole unit file in code>/lib/code>(and having your changes overridden on package upgrade)./p>p>Unless mentioned otherwise the dependencies are specified in a hrefhttps://www.freedesktop.org/software/systemd/man/systemd.unit.html relnoreferrer noopener>code>Unit/code> section/a>/p> /div> a href/blog/post/2022-02-27_increasing_system_robustness_with_systemd_dependencies classread-more>Read More/a> br>br> hr> span classpost-title>a href/blog/post/2021-07-11_rust_and_stm32_arm_-_getting_started_part_3 relbookmark titleRust and STM32 ARM - Getting Started Part 3> Rust and STM32 ARM - Getting Started Part 3 /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/ARM>ARM/a> #a classpost-tag href/blog/tag/Rust>Rust/a> #a classpost-tag href/blog/tag/STM32>STM32/a> /span> span classpost-date> | 2021-07-11 /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>p>Setting up our editor (CLion, VS Code) to debug the STM32 ARM chips./p>p>See a href../../blog/post/2021-06-26_rust_and_stm32_arm_-_getting_started_part_1>Part 1/a> on how to connect to boardand a href../../blog/post/2021-07-04_rust_and_stm32_arm_-_getting_started_part_2>Part 2/a> on how to setup project and OpenOCD for compile and debug/p> /div> a href/blog/post/2021-07-11_rust_and_stm32_arm_-_getting_started_part_3 classread-more>Read More/a> br>br> hr> span classpost-title>a href/blog/post/2021-07-04_rust_and_stm32_arm_-_getting_started_part_2 relbookmark titleRust and STM32 ARM - Getting Started Part 2> Rust and STM32 ARM - Getting Started Part 2 /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/ARM>ARM/a> #a classpost-tag href/blog/tag/Rust>Rust/a> #a classpost-tag href/blog/tag/STM32>STM32/a> /span> span classpost-date> | 2021-07-04 /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>p>Setting up project and programming our first piece of Rust code onto microcontroller (a href/s/blog/post/2021-06-26_rust_and_stm32_arm_-_getting_started_part_1>Part1/a>)/p>h1 idpreparing-build-environment>Preparing build environment/h1>p>After we finished the hardware setup in a href../../blog/post/2021-06-26_rust_and_stm32_arm_-_getting_started_part_1>Part 1/a> we should have working openocd connection./p>p>Rest of this series of posts will assume stlink or jlink debugger + a hrefhttps://stm32-base.org/boards/STM32F103C8T6-Blue-Pill.html relnoreferrer noopener>Blue Pill/a> board. There is variety of clones like these:img src/s/posts/jlink_bluepill_board.webp altJLink + Blue Pill />/p>p>but legality of the software on the clones is at very best dubious.You can also just get a a hrefhttps://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-nucleo-boards/nucleo-f103rb.html relnoreferrer noopener>Nucleo board/a> which contains debugger and small eval board all in one/p>p>We will also be using template graciously provided by Rust a hrefhttps://github.com/rust-embedded/cortex-m-quickstart relnoreferrer noopener>Cortex-M team/a>.Make sure to use at least Rust 1.53 (tutorial is built on that version) and install cross-compile dependencies of rust and code>binutils-arm-none-eabi/code>:/p> /div> a href/blog/post/2021-07-04_rust_and_stm32_arm_-_getting_started_part_2 classread-more>Read More/a> br>br> hr> span classpost-title>a href/blog/post/2021-06-26_rust_and_stm32_arm_-_getting_started_part_1 relbookmark titleRust and STM32 ARM - Getting started part 1> Rust and STM32 ARM - Getting started part 1 /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/ARM>ARM/a> #a classpost-tag href/blog/tag/Rust>Rust/a> #a classpost-tag href/blog/tag/STM32>STM32/a> /span> span classpost-date> | 2021-06-26 /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>p>Setting up tooling and development hardware for Rust on the ARM (STM32 CPUs)/p>h1 idwhat-hardware-do-we-need>What hardware do we need?/h1>ul>li>Dev board. Just about any will do, a hrefhttps://stm32-base.org/boards/STM32F103C8T6-Blue-Pill.html relnoreferrer noopener>Blue Pill/a> is pretty popular, other option is one of the STM32 Discovery boards that come with the programmer./li>li>Programmer/debugger - any of the ST-Link (or clones) will do, here we will be using ST-Link V2 clone. Really, anything supported by openocd is fine, altho some need some tweaking/li>li>Power supply for a dev board - a lot of them just accept micro-USB connector/li>/ul>p>Most dev boards come with some example code, the barebones often just have LED blinking, but Ive seen some that even output on USB./p>p>The more sophisticated ones that have extra peripherals usually come with demo of them so you might want to plug them before doing anything else to have a look./p> /div> a href/blog/post/2021-06-26_rust_and_stm32_arm_-_getting_started_part_1 classread-more>Read More/a> br>br> hr> span classpost-title>a href/blog/post/2021-06-13-automatic_code_formatting_on_git_commit_via_git_filters relbookmark titleAutomatic code formatting on Git commit via git filters> Automatic code formatting on Git commit via git filters /a>/span> br> span classpost-tags> #a classpost-tag href/blog/tag/Git>Git/a> #a classpost-tag href/blog/tag/Go>Go/a> /span> span classpost-date> | 2021-06-13 /span> div classpost-content> style>/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }/* LineNumbers targeted by URL anchor */ .chroma .ln:target { color: #d0d0d0; background-color: #363636 }/* LineNumbersTable targeted by URL anchor */ .chroma .lnt:target { color: #d0d0d0; background-color: #363636 }/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }/* KeywordPseudo */ .chroma .kp { color: #6ab825 }/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }/* NameAttribute */ .chroma .na { color: #bbbbbb }/* NameBuiltin */ .chroma .nb { color: #24909d }/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }/* NameConstant */ .chroma .no { color: #40ffff }/* NameDecorator */ .chroma .nd { color: #ffa500 }/* NameException */ .chroma .ne { color: #bbbbbb }/* NameFunction */ .chroma .nf { color: #447fcf }/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }/* NameVariable */ .chroma .nv { color: #40ffff }/* LiteralString */ .chroma .s { color: #ed9d13 }/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }/* LiteralStringOther */ .chroma .sx { color: #ffa500 }/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }/* LiteralNumber */ .chroma .m { color: #3677a9 }/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }/* Comment */ .chroma .c { color: #999999; font-style: italic }/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }/* GenericDeleted */ .chroma .gd { color: #d22323 }/* GenericEmph */ .chroma .ge { font-style: italic }/* GenericError */ .chroma .gr { color: #d22323 }/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }/* GenericInserted */ .chroma .gi { color: #589819 }/* GenericOutput */ .chroma .go { color: #cccccc }/* GenericPrompt */ .chroma .gp { color: #aaaaaa }/* GenericStrong */ .chroma .gs { font-weight: bold }/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }/* GenericTraceback */ .chroma .gt { color: #d22323 }/* GenericUnderline */ .chroma .gl { text-decoration: underline }/* TextWhitespace */ .chroma .w { color: #666666 }/style>p>Git has very convenient feature called em>filters/em>. What it em>basically/em> allows to do is to pipe the content of a given file (decided by entry in a hrefhttps://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes relnoreferrer noopener>code>.gitattributes/code>/a> thru external filter command./p>p>The different hook points are on file checkout (so called "smudge"), check-in, and on diff./p>p>Here are two useful cases for using it:/p>h1 idformatting-files-on-checkin>Formatting files on checkin/h1>p>If your language have a formatter that just accepts stdin and outputs formatted file on stdout, like Go, it is very straightforward to add it:/p>pre classchroma>span classln>1/span>git config --global filter.gofmt.clean span classs2>"gofmt"/span>span classln>2/span>git config --global filter.gofmt.smudge span classs2>"gofmt"/span> span classc1># or "cat" if you don't want to filter incoming commit/span>/pre>p>then in either code>~/.config/git/attributes/code> or in repository itself under code>.gitattributes/code>/p>pre classchroma>span classln>1/span>*.go filtergofmt/pre>p>em>Do/em> remember that if used on repo where others dont use formatter regularly you might get a bunch of spurious formatting modifications during daily work.em>Especially/em> with filter on checkout./p> /div> a href/blog/post/2021-06-13-automatic_code_formatting_on_git_commit_via_git_filters classread-more>Read More/a> br>br> hr>/article>side classside side-right> !-- sidebar - right -->div class side-right-float>Picka href# stylefont-family: monospace;font-size: 0.9rem onclicksetFontStyle(); return false;>Style/a>a href# stylefont-family: sans-serif;font-size: 0.9rem onclicksetFontStyle(sans); return false;>Style/a>a href# stylefont-family: sans-serif;font-size: 1.1rem onclicksetFontStyle(sansbig); return false;>Style/a>h4>Pages/h4> li>a href/about>About/a>/li>h4>Tags/h4> li>a classarrow href/blog/tag/ARM>ARM 3/a>/li> li>a classarrow href/blog/tag/Rust>Rust 3/a>/li> li>a classarrow href/blog/tag/STM32>STM32 3/a>/li> li>a classarrow href/blog/tag/Linux>Linux 2/a>/li> li>a classarrow href/blog/tag/Git>Git 1/a>/li> li>a classarrow href/blog/tag/rPi>rPi 1/a>/li> li>a classarrow href/blog/tag/linux>linux 1/a>/li> li>a classarrow href/blog/tag/pulseaudio>pulseaudio 1/a>/li> li>a classarrow href/blog/tag/Go>Go 1/a>/li> li>a classarrow href/blog/tag/systemd>systemd 1/a>/li> h4>Archives/h4> li> a classarrow href/blog/date/2022-11>2022-11/a> - a href/blog/post/2022-11-03_splitting_stereo_input_into_mono_in_pulseaudio titleSplitting stereo input into mono in Pulseaudio>#/a> li> a classarrow href/blog/date/2022-04>2022-04/a> - a href/blog/post/2022-04-28-setting_i2c_speed_on_raspberry_pi_4_on_newer_kernels titleSetting I2C speed on Raspberry Pi 4 on newer kernels>#/a> li> a classarrow href/blog/date/2022-02>2022-02/a> - a href/blog/post/2022-02-27_increasing_system_robustness_with_systemd_dependencies titleIncreasing system robustness with systemd dependencies>#/a> li> a classarrow href/blog/date/2021-07>2021-07/a> - a href/blog/post/2021-07-11_rust_and_stm32_arm_-_getting_started_part_3 titleRust and STM32 ARM - Getting Started Part 3>#/a>a href/blog/post/2021-07-04_rust_and_stm32_arm_-_getting_started_part_2 titleRust and STM32 ARM - Getting Started Part 2>#/a> li> a classarrow href/blog/date/2021-06>2021-06/a> - a href/blog/post/2021-06-26_rust_and_stm32_arm_-_getting_started_part_1 titleRust and STM32 ARM - Getting started part 1>#/a>a href/blog/post/2021-06-13-automatic_code_formatting_on_git_commit_via_git_filters titleAutomatic code formatting on Git commit via git filters>#/a>/div>/side>footer classfooter> 🐈/footer>/div>!-- wrapper -->/body>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]