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
bazel run --platform_suffix=_gpu \ | |
--copt=-fdiagnostics-color=always --run_under="cd $PWD && " \ | |
-c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \ | |
mediapipe/examples/facial_search/desktop:facial_search \ | |
-- \ | |
--calculator_graph_config_file=mediapipe/examples/facial_search/graphs/facial_search.pbtxt \ | |
--images_folder_path=mediapipe/examples/facial_search/images/ |
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
bazel run --platform_suffix=_cpu \ | |
--copt=-fdiagnostics-color=always --run_under="cd $PWD && " \ | |
-c opt --define MEDIAPIPE_DISABLE_GPU=1 \ | |
mediapipe/examples/facial_search/desktop:facial_search \ | |
-- \ | |
--calculator_graph_config_file=mediapipe/examples/facial_search/graphs/facial_search.pbtxt \ | |
--images_folder_path=mediapipe/examples/facial_search/images/ |
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
grep --version && uname -v | |
# grep (BSD grep) 2.5.1-FreeBSD | |
# Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 | |
grep -A1 -E "urls = \[" */WORKSPACE | |
# example_http_archive_locked/WORKSPACE: urls = [ | |
# example_http_archive_locked/WORKSPACE- "https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", | |
#but: | |
grep -m1 -A1 -E "urls = \[" */WORKSPACE |
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
defmodule CapitalizeHeaderKeys do | |
def hook(status, headers, body, req) do | |
headers = capitalize_resp_headers(headers) | |
{:ok, req} = :cowboy_req.reply(status, headers, body, req) | |
req | |
end | |
# Cowboy v1 | |
defp capitalize_resp_headers(headers) when is_list(headers) do | |
:lists.keymap(&:cowboy_bstr.capitalize_token/1, 1, headers) |
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
If your thinkpad T460 is somehow stuck in a reboot cycle | |
* right after a storm | |
* even though your SSD / peripherals work fine on other laptops | |
* even after trying everything forums & youtube has to offer | |
* even after buying a non functional motherboard from Moldavia from [this guy](https://www.ebay.com/usr/goodwinflat) | |
* even after expecting that previous idea would work somehow | |
well then try disabling anything you can in your BIOS. | |
If you can't even get to BIOS you have bigger issues. Maybe power? Probably motherboard. | |
Turns out, for me, disabling the Intel Trusted execution things (TPM, TXT, ...) solved it! |
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 "fmt" | |
import "bytes" | |
func (* bytes.Buffer) Eh() string { | |
return "yay" | |
} | |
func main() { | |
fmt.Println("hey!") |
You are writing a CLI client in Go and your users would love to be able to update this client seamlessly.
I'm talking replacing a currently running executable on UNIX platforms.
// exa.go
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
0 voidstar.git conan (20.2) ∀ ./dockcross bash -c 'mkdir build && cd build && conan install --build -- .. && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .' | |
Auto detecting your dev setup to initialize the default profile (/home/pete/.conan/profiles/default) | |
CC and CXX: /usr/src/mxe/usr/bin/x86_64-w64-mingw32.static-gcc, /usr/src/mxe/usr/bin/x86_64-w64-mingw32.static-g++ | |
Found gcc 5.4 | |
Default settings | |
os=Linux | |
arch=x86_64 | |
compiler=gcc | |
compiler.version=5.4 | |
compiler.libcxx=libstdc++ |
NewerOlder