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" | |
/* | |
http://blog.notdot.net/2007/4/Damn-Cool-Algorithms-Part-1-BK-Trees | |
*/ | |
type bkNode struct { | |
Word string |
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 stack | |
//Stack Object to store the items in the order of pushed.. | |
type Stack struct { | |
elems []interface{} | |
top int | |
} | |
//NewStack will return a Stack object - on which you can perform | |
//Push, Pop, Peek, Size operations |
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 heap | |
// HeapData has to be implemented by any data | |
// that will be inserted into the Heap Data structure. | |
// You can create MinHeap or MaxHeap. | |
type HeapData interface { | |
IsLessThan(h HeapData) bool | |
} | |
//Heap holds the entire heap object |
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
#include <stdio.h> | |
#define ERRNO_ENUM_ARG(enum_arg, errstr_arg) enum_arg | |
#define ERRNO_ERRSTR_ARG(enum_arg, errstr_arg) errstr_arg | |
#define ERRNO_ENUM_LIST_ALL(mac) \ | |
mac(E_NOERROR, "No Error"), \ | |
mac(E_INVALID_FILE, "Invalid File Error"), \ | |
mac(E_NETWORK_DISC, "Network Disconnected Error"), \ | |
mac(E_LAST_ERROR, "Unknown Error...") // This *HAS* to be the last in the list.. |
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
:9200/_cluster/health - get the cluster Health | |
:9200/_cat/indices - get the list of indices | |
:9200/<index>/_settings - get the settings for an index | |
:9200/_cat/nodes - get a high level health from each of the nodes (kind of like unix top) | |
:9200/_mapping - get a list of all mappings from all indices | |
:9200/<index>/_mapping - get the list of mapping for a given index - (index can be a wild card) |
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
/volume # stacker --debug build -f stacker.yaml | |
building image first... | |
importing files... | |
Getting image source signatures | |
Copying blob sha256:aeb7866da422acc7e93dcf7323f38d7646f6269af33bcdb6647f2094fc4b3bf7 | |
71.24 MiB / 71.24 MiB [====================================================] 5s | |
Copying config sha256:1e8ad5e15a62dea6c1a650a7ff14da420854aaac4f3b2b5e5da9f70fc6c22ec6 | |
1.05 KiB / 1.05 KiB [======================================================] 0s | |
Writing manifest to image destination | |
Storing signatures |
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
root@ee9f23086720:/first# more ./.stacker/lxc.log | |
lxc .working 20181121020640.903 TRACE commands - commands.c:lxc_cmd_init:1249 - Creating abstract unix socket "/first/roots/.working/command" | |
lxc .working 20181121020640.903 TRACE start - start.c:lxc_init_handler:729 - Unix domain socket 3 for command server is ready | |
lxc .working 20181121020640.903 TRACE execute - execute.c:lxc_execute:157 - Doing lxc_execute | |
lxc .working 20181121020640.903 INFO lsm - lsm/lsm.c:lsm_init:47 - LSM security driver AppArmor | |
lxc .working 20181121020640.903 TRACE start - start.c:lxc_init:746 - Initialized LSM |
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 ( | |
"encoding/json" | |
"log" | |
"net/http" | |
"fmt" | |
"sort" | |
"github.com/gorilla/mux" |
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 | |
/* | |
To Get Results of a CC: [95% implemented] | |
curl -X GET http://localhost:12345/cc/742dd936-73f3-4bbf-850e-ff951af042e/results | |
To Trigger a CC: [50% implemented - does NOT trigger cc_analyzer...] | |
curl -X POST http://localhost:12345/cc -H 'Content-Type: application/json' \ |
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" | |
"net/http" | |
"net" | |
"github.com/gorilla/mux" | |
) | |
/* |
OlderNewer