Skip to content

Instantly share code, notes, and snippets.

[teamcity]
remote = <your remote repository url>
mysql> explain select s.branch_name
from build_state s
where s.branch_name is not null
and s.id in (select h.build_state_id from history h where h.build_type_id = 'bt400' and h.build_start_time_server > 1353004041189);
+----+--------------------+-------+----------------+-------------------------------------------------------+------------------+---------+------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+--------------------+-------+----------------+-------------------------------------------------------+------------------+---------+------+-------+-------------+
| 1 | PRIMARY | s | ALL | NULL | NULL | NULL | NULL | 47559 | Using where |
| 2 | DEPENDENT SUBQUERY | h | index_subquery | start_time_index,build_type_id_index,history_state_id | history_state_id | 9
@nd
nd / EmacsND.xml
Last active August 29, 2015 14:21
<!-- keymaps/EmacsND.xml -->
<keymap version="1" name="EmacsND" parent="Emacs">
<action id="$Copy">
<keyboard-shortcut first-keystroke="alt C" />
</action>
<action id="ActivateChangesToolWindow">
<keyboard-shortcut first-keystroke="alt 9" />
<keyboard-shortcut first-keystroke="meta 9" />
</action>
<action id="ActivateDebugToolWindow">
@nd
nd / delve.log
Created January 23, 2019 12:04
Delve.log
time="2019-01-23T12:40:56+03:00" level=debug msg="<- RPCServer.CreateBreakpoint(rpc2.CreateBreakpointIn{\"Breakpoint\":{\"id\":0,\"name\":\"\",\"addr\":0,\"file\":\"/tmp/unitTest_doNotLeaveCallerIfStepIntoRecursiveFunctionFails/smartStepIntoRecursiveCall/main.go\",\"line\":15,\"Cond\":\"\",\"continue\":false,\"traceReturn\":false,\"goroutine\":false,\"stacktrace\":0,\"LoadArgs\":null,\"LoadLocals\":null,\"hitCount\":null,\"totalHitCount\":0}})" layer=rpc
time="2019-01-23T12:40:56+03:00" level=debug msg="-> *rpc2.CreateBreakpointOut{\"Breakpoint\":{\"id\":1,\"name\":\"\",\"addr\":4543818,\"file\":\"/tmp/unitTest_doNotLeaveCallerIfStepIntoRecursiveFunctionFails/smartStepIntoRecursiveCall/main.go\",\"line\":15,\"functionName\":\"main.sum\",\"Cond\":\"\",\"continue\":false,\"traceReturn\":false,\"goroutine\":false,\"stacktrace\":0,\"LoadArgs\":null,\"LoadLocals\":null,\"hitCount\":{},\"totalHitCount\":0}} error: \"\"" layer=rpc
time="2019-01-23T12:40:56+03:00" level=debug msg="(async 3) <- RPCServer.Command(api
dlv --log --log-output rpc --listen=localhost:40280 --headless=true --api-version=2 exec /tmp/unitTest_doNotLeaveCallerIfStepIntoRecursiveFunctionFails/___application --
time="2019-01-23T18:04:13+03:00" level=debug msg="(async 1) <- RPCServer.Command(api.DebuggerCommand{\"name\":\"halt\",\"ReturnInfoLoadConfig\":null})" layer=rpc
time="2019-01-23T18:04:13+03:00" level=debug msg="(async 1) -> rpc2.CommandOut{\"State\":{\"Running\":false,\"currentThread\":{\"id\":9892,\"pc\":4523328,\"file\":\"/opt/buildAgent/work/d77d03bd8965c181/src/test/testData/integration/go/src/runtime/rt0_linux_amd64.s\",\"line\":8,\"function\":{\"name\":\"_rt0_amd64_linux\",\"value\":4523328,\"type\":0,\"goType\":0,\"optimized\":false},\"goroutineID\":0,\"ReturnValues\":null},\"Threads\":[{\"id\":9892,\"pc\":4523328,\"file\":\"/opt/buildAgent/work/d77d03bd8965c181/src/test/testData/integration/go/src/runtime/rt0_linux_amd64.s\",\"line\":8,\"function\":{\"name\":\"_rt0_amd64_linux\",\"value\":4523328,\"type\":0,\"goType\":0,\"optimized
$ taskset -c 0,1 dlv --log --log-output rpc --listen=localhost:41841 --headless=true --api-version=2 exec /tmp/unitTest_decimalNumberPresentation/___application -- #gosetup
API server listening at: 127.0.0.1:41841 
time="2019-01-25T12:15:50+01:00" level=debug msg="<- RPCServer.FindLocation(rpc2.FindLocationIn{\"Scope\":{\"GoroutineID\":-1,\"Frame\":0,\"DeferredCall\":0},\"Loc\":\"main.main\"})" layer=rpc 
time="2019-01-25T12:15:50+01:00" level=debug msg="-> *rpc2.FindLocationOut{\"Locations\":[{\"pc\":4553311,\"file\":\"/tmp/unitTest_decimalNumberPresentation/numberPresentation/main.go\",\"line\":5,\"function\":{\"name\":\"main.main\",\"value\":4553296,\"type\":0,\"goType\":0,\"optimized\":false}}]} error: \"\"" layer=rpc 
time="2019-01-25T12:15:50+01:00" level=debug msg="<- RPCServer.CreateBreakpoint(rpc2.CreateBreakpointIn{\"Breakpoint\":{\"id\":0,\"name\":\"\",\"addr\":0,\"file\":\"/tmp/unitTest_decimalNumberPresentation/numberPresentation/main.go\",\"line\":13,\"Cond\":\"\",\"continue\":false,\"trace
@nd
nd / rc.md
Last active February 9, 2019 18:34
Intellij run configurations

Ion is a C-like language from the bitwise project.

Like C it has the main function. I want to run it from Idea. The run configuration tutorial asks you to draw an owl right away. We will draw it one line at a time.

Create run a configuration type

@nd
nd / clion.md
Created February 24, 2019 10:42

In his streams Per updates the ion compiler while writing ion. To have a similar workflow in Clion:

Open the ion directory as a project - this will create CMakeLists.txt.

Change CMakeLists.txt with the following content

cmake_minimum_required(VERSION 3.13)
project(ion C)
@nd
nd / dlv-gdbwire-rpc.log
Created March 7, 2019 21:00
delve fatal error gdbwire and rpc log
time="2019-03-07T21:49:24+01:00" level=debug msg="<- +" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="<- $QStartNoAckMode#b0" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="-> +" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="-> $OK#9a" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="<- +" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="<- $QThreadSuffixSupported#e4" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="-> $OK#00" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="<- $qSupported:swbreak+;hwbreak+;no-resumed+;xmlRegisters=i386#c5" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="-> $qXfer:features:read+;PacketSize=20000;qEcho+#00" layer=gdbconn
time="2019-03-07T21:49:24+01:00" level=debug msg="<- $qRegisterInfo0#72" layer=gdbconn
API server listening at: 127.0.0.1:56220
2019-07-11T09:48:38+02:00 debug layer=gdbconn <- +
2019-07-11T09:48:38+02:00 debug layer=gdbconn <- $QStartNoAckMode#b0
2019-07-11T09:48:38+02:00 debug layer=gdbconn -> +
2019-07-11T09:48:38+02:00 debug layer=gdbconn -> $OK#9a
2019-07-11T09:48:38+02:00 debug layer=gdbconn <- +
2019-07-11T09:48:38+02:00 debug layer=gdbconn <- $QThreadSuffixSupported#e4
2019-07-11T09:48:38+02:00 debug layer=gdbconn -> $OK#00
2019-07-11T09:48:38+02:00 debug layer=gdbconn <- $qSupported:swbreak+;hwbreak+;no-resumed+;xmlRegisters=i386#c5
2019-07-11T09:48:38+02:00 debug layer=gdbconn -> $qXfer:features:read+;PacketSize=20000;qEcho+#00