Skip to content

Instantly share code, notes, and snippets.

View mushinlogit's full-sized avatar

mushinlogit mushinlogit

View GitHub Profile
@mushinlogit
mushinlogit / vscode
Created August 1, 2018 16:25
vscode
{
"window.zoomLevel": 0,
"typescript.implementationsCodeLens.enabled": true,
"typescript.referencesCodeLens.enabled": true,
"javascript.referencesCodeLens.enabled": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false
}
@mushinlogit
mushinlogit / angular-cli-err.txt
Created June 29, 2018 19:50
angular-cli-err.txt
Date: 2018-06-29T19:30:38.971Z - Hash: c3a241ab034e71a445fe - Time: 2914ms
27 unchanged chunks
chunk {app-assess-v3-assess-module} app-assess-v3-assess-module.js, app-assess-v3-assess-module.ce93dfa9e056e74de1a8.hot-update.js, app-assess-v3-assess-module.js.map, app-assess-v3-assess-module.ce93dfa9e056e74de1a8.hot-update.js.map (app-assess-v3-assess-module) 392 kB [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 35.6 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」: wait until bundle finished: /assets/config/local-settings.json
ℹ 「wdm」: wait until bundle finished: /assets/config/local-settings.json
ℹ 「wdm」: wait until bundle finished: /assets/images/logos/github.png
ℹ 「wdm」: wait until bundle finished: /assets/images/logos/gitlab.png
@mushinlogit
mushinlogit / published.js
Created June 28, 2018 18:33
published.js
db.getCollection('stix').aggregate([
{ $match: { 'stix.type': 'x-unfetter-assessment-set' } },
{
$project: {
'stix.assessment_sets': {
$arrayElemAt: ['$stix.assessment_sets', 0]
},
'metaProperties.published': 1,
'stix.id': 1,
'stix.name': 1,
@mushinlogit
mushinlogit / x-unfetter-object-assessment.js
Created June 14, 2018 20:37
x-unfetter-object-assessment.js
const mongoose = require('mongoose');
const stixCommons = require('./stix-commons');
const xunfetterAssessObject = require('./x-unfetter-assessed-object').xunfetterAssessObject;
const StixSchema = {
created_by_ref: {
type: String,
required: [true, 'created_by_ref is required']
},
type: {
@mushinlogit
mushinlogit / test-data.json
Last active June 14, 2018 20:35
test-data.json
{
"data": {
"attributes": {
"created": "2018-06-14T18:50:16.132Z",
"valid_from": "2018-06-14T18:50:16.132Z",
"version": 2,
"type": "x-unfetter-object-assessment",
"object_ref": "x-unfetter-capability--2288d472-daeb-4be5-82f2-03b3d8eb3c51",
"assessed_objects": [
{
@mushinlogit
mushinlogit / git-up.sh
Created June 14, 2018 14:58
git-up.sh
#!/bin/bash
function gitClean() {
echo "prune local branches"
git branch -avv | grep gone | cut -d '\'' '\'' -f 3 | xargs git branch -D';
}
for PROJ in "unfetter-store" "unfetter" "unfetter-ui" "taxii-server" "stix" "stix2pattern"
do
pushd $PROJ
@mushinlogit
mushinlogit / git-config.sh
Created January 22, 2018 16:56
git-config.sh
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@mushinlogit
mushinlogit / keybase.md
Created January 12, 2018 14:43
keybase.md

Keybase proof

I hereby claim:

  • I am mushinlogit on github.
  • I am mushinlogit (https://keybase.io/mushinlogit) on keybase.
  • I have a public key ASAFxGnOcbHm1Ai0e1P-ffYfL_LCxDG9VYikmbYaZvrRGQo

To claim this, I am signing this object:

@mushinlogit
mushinlogit / docker-compose.processor.yml
Last active September 18, 2017 14:39
processor compose
version: '2'
services:
unfetter-discover-processor:
build: ../unfetter-store/unfetter-discover-processor
container_name: unfetter-discover-processor
image: unfetter-discover-processor
volumes:
- ./config/examples:/tmp/examples
- ../unfetter-store/unfetter-discover-processor:/usr/src/app
environment:
@mushinlogit
mushinlogit / uniqueDownloadTypes.js
Last active September 18, 2017 15:12
uniqueDownloadTypes.js
const uniqueDownloadTypes = (resp) => {
const types = resp.objects.map(el => el.type);
return new Set(types);
}