Skip to content

Instantly share code, notes, and snippets.

View miketheprogrammer's full-sized avatar

Michael Hernandez miketheprogrammer

View GitHub Profile
$ echo '{"type":"control_request","request_id":"test1","request":{"subtype":"initialize"}}' | claude --output-format stream-json --input-format stream-json --include-partial-messages --verbose --setting-sources "" --permission-mode acceptEdits 2>/dev/null | head -20
{"type":"control_response","response":{"subtype":"success","request_id":"test1","response":{"commands":[{"name":"keybindings-help","description":"Use when the user wants to customize keyboard shortcuts, rebind keys, add chord bindings, or modify ~/.claude/keybindings.json. Examples: \"rebind ctrl+s\", \"add a chord shortcut\", \"change the submit key\", \"customize keybindings\". (bundled)","argumentHint":""},{"name":"debug","description":"Debug your current Claude Code session by reading the session debug log. (bundled)","argumentHint":"[issue description]"},{"name":"claude-developer-platform","description":"Use this skill when the user wants to build a program that calls the Claude API or Anthropic SDK, OR when they need an AI/LLM and haven't ch
echo '{"type":"control_request","request_id":"test1","request":{"subtype":"initialize"}}' | claude --output-format stream-json --input-format stream-json --include-partial-messages --verbose --setting-sources "" --permission-mode acceptEdits 2>/dev/null | head -20
package main
import (
"bufio"
"context"
"encoding/json"
"fmt"
"log"
"os"
"os/exec"
render() {
var showToolbar = true;
return (
{ x == true ? <Toolbar/> : <div></div> }
{ x == true ? <Toolbar/> : { x == true ? <Toolbar/> : <div></div> } }
)
}
@miketheprogrammer
miketheprogrammer / logger.js
Last active March 14, 2016 15:24
example of formatted logging
LOSX-339623-HET-N:xml-escape mhernandez01$ cat logger.js && echo "\n -------- OUTPUT ---------- \n" && node logger.js
var moment = require('moment')
var statusLogger = {
error: function () {
var msg = Array.prototype.slice.call(arguments).join(' ');
console.error('[statuslog - error]', '- ( ' + moment().format() + ' ) -', msg)
},
log: function () {
var msg = Array.prototype.slice.call(arguments).join(' ');
console.log('[statuslog - out]', '- ( ' + moment().format() + ' ) -', msg)
The GoClient Sends the following JSON
Writing {"_id":7,"_action":"call","_method":"insert_submenu_at","_target":2,"_args":{"size":{},"command_id":3,"index":1,"label":"File","menu_id":3}}
--(Foo)++__THRUST_SHELL_BOUNDARY__++(Bar)--
EOF
panic: EOF
The Crash log for the Thrust server
// The Compile Bugs
In file included from ../../src/browser/exo_menu.cc:4:
In file included from ../../src/browser/exo_menu.h:11:
../../vendor/brightray/vendor/download/libchromiumcontent/src/base/memory/scoped_ptr.h:313:3: error: static_assert failed "T_is_refcounted_type_and_needs_scoped_refptr"
COMPILE_ASSERT(base::internal::IsNotRefCounted<T>::value,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../vendor/brightray/vendor/download/libchromiumcontent/src/base/macros.h:160:35: note: expanded from macro 'COMPILE_ASSERT'
#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
^
nm out/Debug/libnode_base.a | grep node_module_register
U _node_module_register
U _node_module_register
0000ba10 T _node_module_register
U _node_module_register
U _node_module_register
U _node_module_register
U _node_module_register
U _node_module_register
U _node_module_register
var util = require('util');
var client = argument[0]
config = {
clients: {
demo: {
url: 'demo.cc.com'
[
'hello',
'world'
].join(' ')