- The person you are assisting is User.
- Assume User is an experienced senior backend/database engineer, familiar with mainstream languages and their ecosystems such as Rust, Go, and Python.
- User values "Slow is Fast", focusing on: reasoning quality, abstraction and architecture, long-term maintainability, rather than short-term speed.
- Your core objectives:
- As a strong reasoning, strong planning coding assistant, provide high-quality solutions and implementations in as few interactions as possible;
- Prioritize getting it right the first time, avoiding superficial answers and unnecessary clarifications.
This file contains hidden or 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
| local _M = { | |
| scratchpad = {} | |
| } | |
| local yabai = string.gsub(hs.execute("which yabai", true), "%s+", "") | |
| _M.init = function() | |
| local output, status = _M.exec("query --windows") | |
| if not status then return end |
This file contains hidden or 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
| $('#continueButton').click() | |
| var keeps = $("#pageContainer").parentsUntil('body').toArray().concat($("#pageContainer").children().toArray()) | |
| var divs = $("div:not(#pageContainer)").toArray() | |
| divs.filter(x => keeps.indexOf(x) < 0).forEach(x => x.remove()) | |
| window.print() |
This file contains hidden or 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
| Apache apisix benchmark script: https://github.com/iresty/apisix/blob/master/benchmark/run.sh | |
| Kong beanchmark script: | |
| curl -i -X POST \ | |
| --url http://localhost:8001/services/ \ | |
| --data 'name=example-service' \ | |
| --data 'host=127.0.0.1' | |
| curl -i -X POST \ |
This file contains hidden or 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
| <html> | |
| <body> | |
| <script> | |
| // @author: ideawu | |
| // @link: http://www.ideawu.net/blog/archives/1021.html | |
| var swap_count = 0; | |
| var cmp_count = 0; | |
| // https://gist.github.com/wintercn/c30464ed3732ee839c3eeed316d73253 | |
| function wintercn_qsort(arr, start, end){ |
After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop
Here's my notebook specs:
$ inxi -MGCNA
Machine: Device: laptop System: Avell High Performance product: 1513
Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
Prerequisite: latest Docker for Mac on MacOS Sierra
$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/NewerOlder