nix

聊聊身边的嵌入式,价格不菲的运动手表

妖精的绣舞 提交于 2021-02-20 15:15:44
当跑步爱好者遇上运动手表 不知从什么时候开始,跑步变得流行起来,我也是跑步大军中的一员,并且跑完后还会在朋友圈晒个图。这是我第一次跑5KM的记录, 中途因为体力不支数次想要放弃,硬是被一个小伙伴鼓励着、连拉带走跑完全程的。 当体验了跑步的乐趣之后,后面就一发不可收拾了,下面是我最远的一次跑步记录, 下面是最快的一次5KM跑,不过记录还停留在2年前,至今未被自己打破,😓 之前我一直用手机APP记录跑步,用过的APP有咕咚、悦跑圈和Keep,用多了以后因为各种原因都不是很满意。 并且单从UI方面,我觉得都不如下面这个朋友发的好看, 后来得知他用的是佳明运动手表跑的,配上手机端的APP使用的。不过在了解其价格需要数千元之后,我就没再关注了,那时心里想为了一个跑步让我花这么多钱,我才不干呢。 直到前不久一个朋友送了我一块他戴过的运动手表(颂拓的Spartan Sport Wrist HR,他自己换成了佳明fēnix 6X Battery Life),我就彻底改为戴运动手表跑步了。 体验了几次之后,觉得运动手表确实很香。相比我之前用手机记录运动,有以下几点好处: 1)用起来更方便,只要戴在手腕上即可,解放了双手,外出跑步时甚至不用带手机出门了。跑完后的数据会记录在手表里,也可以轻松的通过蓝牙同步到手机APP中。 2)可以记录心率值,不过手表自带的心率检测不是很准,它用的是光电检测原理

How to build Nix packages from source?

孤街醉人 提交于 2021-02-19 07:46:06
问题 I think NixOS is great, but can't figure out how to build a package from source. Understanding the Nix expression language is not the problem, but to know what to put in a default.nix in order to build a package. Take for example the Nix expression for gedit : { stdenv, intltool, fetchurl, enchant, isocodes , pkgconfig, gtk3, glib , bash, wrapGAppsHook, itstool, libsoup, libxml2 , gnome3, librsvg, gdk_pixbuf, file, gspell }: stdenv.mkDerivation rec { inherit (import ./src.nix fetchurl) name

How to `nix-build` again a built store path?

十年热恋 提交于 2021-02-18 05:32:09
问题 I create my own repository to fetch some git source. # packages.nix with (import <nixpkgs> {}); rec { rustcSource = fetchgit { url = https://github.com/rust-lang/rust; rev = "3191fbae9da539442351f883bdabcad0d72efcb6"; sha256 = "0w1l14kz9kxyj5dw3w9xxk1fzww5xqs3sf8saay0mh7nkmvrdb59"; }; } Then I build rustcSource , sudo nix-env -f package.nix -A rustcSource It reveals a store path of /nix/store/096fpy9qjbz5r14aadjnq9d2md9ql9cg-rust-3191fba . The problem is, I forgot to download it's submodules,

Authentication Failure when Accessing Azure Blob Storage through Connection String

微笑、不失礼 提交于 2021-02-10 20:21:07
问题 We got error of Authentication fail, when we try to create an azure blob client from connection string, using python v12 sdk with Azure Blob Storage v12.5.0, and Azure core 1.8.2. I used azure-storate-blob == 12.5.0 azure-core == 1.8.2 I tried to access my blob storage account using connection string with Python v12 SDK and received the error above. The environment I'm running in is python venv in NixShell. The code for calling the blob_upload is as following: blob_service_client =

Authentication Failure when Accessing Azure Blob Storage through Connection String

别说谁变了你拦得住时间么 提交于 2021-02-10 20:19:29
问题 We got error of Authentication fail, when we try to create an azure blob client from connection string, using python v12 sdk with Azure Blob Storage v12.5.0, and Azure core 1.8.2. I used azure-storate-blob == 12.5.0 azure-core == 1.8.2 I tried to access my blob storage account using connection string with Python v12 SDK and received the error above. The environment I'm running in is python venv in NixShell. The code for calling the blob_upload is as following: blob_service_client =

stack --nix build complains about ghc version mismatch

做~自己de王妃 提交于 2021-02-08 18:33:59
问题 When building threepenny-gui on NixOS with stack --nix build , I got error saying I have the wrong version of ghc. Then I tried stack --nix setup , which doesn't run because bash is on an unexpected path on NixOS (that's expected, since the stack documentation only mentions stack --nix build not setup ). What am I missing? FYI, to deal with the zlib issues I have also added a shell.nix and default.nix per https://github.com/commercialhaskell/stack/issues/2130 EDIT: was able to build with the

stack --nix build complains about ghc version mismatch

↘锁芯ラ 提交于 2021-02-08 18:30:27
问题 When building threepenny-gui on NixOS with stack --nix build , I got error saying I have the wrong version of ghc. Then I tried stack --nix setup , which doesn't run because bash is on an unexpected path on NixOS (that's expected, since the stack documentation only mentions stack --nix build not setup ). What am I missing? FYI, to deal with the zlib issues I have also added a shell.nix and default.nix per https://github.com/commercialhaskell/stack/issues/2130 EDIT: was able to build with the

stack --nix build complains about ghc version mismatch

时间秒杀一切 提交于 2021-02-08 18:29:55
问题 When building threepenny-gui on NixOS with stack --nix build , I got error saying I have the wrong version of ghc. Then I tried stack --nix setup , which doesn't run because bash is on an unexpected path on NixOS (that's expected, since the stack documentation only mentions stack --nix build not setup ). What am I missing? FYI, to deal with the zlib issues I have also added a shell.nix and default.nix per https://github.com/commercialhaskell/stack/issues/2130 EDIT: was able to build with the

DVWA--Command Injection

别来无恙 提交于 2020-11-21 02:21:47
首先我们查看源代码一下 <? php if ( isset( $_POST[ ' Submit ' ] ) ) { // Get input $target = $_REQUEST[ ' ip ' ]; // Determine OS and execute the ping command. if ( stristr( php_uname( ' s ' ), ' Windows NT ' ) ) { // Windows $cmd = shell_exec( ' ping ' . $target ); } else { // *nix $cmd = shell_exec( ' ping -c 4 ' . $target ); } // Feedback for the end user echo " <pre>{$cmd}</pre> " ; } ?> 这里对一些函数进行解释 stristr(string,search,before_search) stristr 函数搜索字符串在另一字符串中的第一次出现,返回字符串的剩余部分(从匹配点),如果未找到所搜索的字符串,则返回 FALSE 。参数 string 规定被搜索的字符串,参数 search 规定要搜索的字符串(如果该参数是数字,则搜索匹配该数字对应的 ASCII 值的字符),可选参数 before_true 为布尔型,默认为

谁说中国没有 Linus?中国初代 IT 宗师封神榜

帅比萌擦擦* 提交于 2020-11-13 11:45:08
作者 | 马超 责编 | 伍杏玲 出品 | CSDN(ID:CSDNnews) 最近我国科技界在面临美国施压之际,不少人在问“为什么林纳斯一个人写出 Linux,而中国却出不了一个林纳斯?”笔者有感于六代技术人在岳麓对话,写下《 如何成为一名求伯君式的黑客 》后,很多读者留言问求伯君研发 WPS 时是否参考 Word 的相关代码。 在回答这些灵魂问题前,我们先来看下,据 GitHub 数据显示,目前 GitHub 新增的活跃用户中有 70% 以上是来自中国程序员,他们绝大部分是 90 后,得益于 1995 年后搭载着的 Windows 个人 PC 在中国市场的快速普及,我国 90 后程序员是 IT 原生一代。 按照比尔·盖茨最初的时间表,微软原计划在 2000 年后再将 Windows 全面带入中国,在看到王志东的中文之星以后,时间点至少被提前了五年。 笔者看来,我国初代程序员大神所取得的成就并不亚于林纳斯,所谓中国林纳斯式之问根本就是伪命题,如果没有严援朝、王志东这些前辈的贡献,中国的 IT 行业不可能像现在这样繁荣。令人遗憾的是在 80 年代 IT 人的主战场是 DOS 这个快被人遗忘的平台,而时代抛弃 DOS 的时候不但没说一声再见,甚至连它曾经辉煌过的痕迹都一同抹去了。 DOS vs *nix IT 界每十年就会产生一种新的生态,如四十年前由 IBM 兼容