Skip to content

Instantly share code, notes, and snippets.

@scootcho
scootcho / domain-driven-design-cheatsheet.txt
Created February 1, 2021 22:38 — forked from jahe/domain-driven-design-cheatsheet.txt
Domain Driven Design Cheatsheet
tldr;
DDD is primarily about modeling a Ubiquitous (= überall vertreten) Language in an Bounded Context.
It avoids the design of monolithic applications.
Use DDD when the business model complexity is high (higher than the technical aspects of the project).
Bounded Context - semantic contextual boundary
Within the boundary, each component of the software model has a specific meaning and does specific things
The components inside a Bounded Context are context specific and semantically motivated.
In the Beginning of software modeling the Bounded Context is only coceptual and is part of the Problem Space.
@scootcho
scootcho / domain-driven-design-cheatsheet.txt
Created February 1, 2021 22:38 — forked from jahe/domain-driven-design-cheatsheet.txt
Domain Driven Design Cheatsheet
tldr;
DDD is primarily about modeling a Ubiquitous (= überall vertreten) Language in an Bounded Context.
It avoids the design of monolithic applications.
Use DDD when the business model complexity is high (higher than the technical aspects of the project).
Bounded Context - semantic contextual boundary
Within the boundary, each component of the software model has a specific meaning and does specific things
The components inside a Bounded Context are context specific and semantically motivated.
In the Beginning of software modeling the Bounded Context is only coceptual and is part of the Problem Space.
@scootcho
scootcho / Classes.js
Created January 8, 2021 18:21 — forked from gaearon/Classes.js
Beneath Classes: Prototypes
class Spiderman {
lookOut() {
alert('My Spider-Sense is tingling.');
}
}
let miles = new Spiderman();
miles.lookOut();
#!/bin/bash
leapyear=1
year=${1:-$(date '+%Y')}
day=${2:-$(date '+%j')}
([ $(($day)) -lt 60 ]) || ([ $(($year % 4)) -eq 0 ] && ([ $(($year % 100)) -ne 0 ] || [ $(($year % 400)) -eq 0 ])) &&
leapyear=0
file=$(($day + leapyear)).jpg
qimgv /usr/local/share/daily-stoic/$file
@scootcho
scootcho / comlog.nginx.conf
Created July 15, 2020 02:56 — forked from jegj/comlog.nginx.conf
Basic provision script for node js server(expressif) + nginx + postgres 10.x
upstream comlog {
server unix:/tmp/comlog.socket;
}
server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/nginx/certs/dev.comlog.crt;
ssl_certificate_key /etc/nginx/certs/dev.comlog.key;
@scootcho
scootcho / IllustratorSaveAsSVGs.jsx
Created June 10, 2020 15:35 — forked from seltzered/IllustratorSaveAsSVGs.jsx
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source
@scootcho
scootcho / netrw.txt
Created May 30, 2020 00:11 — forked from danidiaz/netrw.txt
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@scootcho
scootcho / netrw quick reference.md
Created May 30, 2020 00:11 — forked from t-mart/netrw quick reference.md
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory

How to Build a Cuckoo Sandbox Malware Analysis System

I had a heck of a time getting a Cuckoo sandbox running, and below I hope to help you get one up and running relatively quickly by detailing out the steps and gotchas I stumbled across along the way. I mention this in the references at the end of this gist, but what you see here is heavily influenced by this article from Nviso

Build your Linux Cuckoo VM

  1. Setup a Ubuntu 16.04 64-bit desktop VM (download here) in VMWare with the following properties:
  • 100GB hard drive
  • 2 procs
  • 8 gigs of RAM
@scootcho
scootcho / gist:3db34735af70ec7fac3bda85f359ce1a
Created May 2, 2020 22:41 — forked from amad-person/gist:f0ef85a2123a2e1fcf8052dcf09eef90
Bypass CSP restrictions in create-react-app Chrome extensions

While building a React Chrome extension using the create-react-app utility (v2.x), I came across the following error on loading my unpacked extension:

Refused to execute inline script because it violates the following Content Security Policy directive: “script-src ‘self’
blob: filesystem: chrome-extension-resource:”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-
GgRxrVOKNdB4LrRsVPDSbzvfdV4UqglmviH9GoBJ5jk=’), or a nonce (‘nonce-…’) is required to enable inline execution.

Basically, this error arises as Chrome (or almost any modern browser) will not allow inline scripts to get executed. This CSP restriction resulted in the above error as the build script in create-react-app bundles the .js files in <script> tags in the <body> of index.html.