We can export a mermaid diagram to PNG very simply using the official Mermaid CLI Tool.
Installation via npm
npm i -g mermaid.cli
Usage:
The following steps are meant either to complement the wonderful book titled "The IoT Hacker’s Handbook A Practical Guide to Hacking the Internet of Things" by Aditya Gupta or to act as a generic aid in firmware exploiting and pentesting for Win10 users. | |
1. Clone akx's branch of binwalk: | |
git clone -b packaging-fixes https://github.com/akx/binwalk.git | |
2. Change to this newly-created directory and install the module: | |
cd C:\Path\to\binwalk | |
pip3 install . | |
3. Download squashfs for Windows: |
We can export a mermaid diagram to PNG very simply using the official Mermaid CLI Tool.
Installation via npm
npm i -g mermaid.cli
Usage:
""" | |
Pcap class to more easily interact with pcaps | |
When in doubt, aim for simplicity of requests API | |
Like pyshark, but for the wireshark utilities | |
""" | |
import os | |
import subprocess as sp | |
import re | |
import pprint | |
import tempfile |
import click | |
import hashlib | |
import requests | |
from pathlib import Path | |
from tqdm import tqdm | |
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) |
Make sure you've read the Angular.io CONTRIBUTING.md before starting out.
Follow these steps when you are setting up the repo locally for the first time and would like to view your changes in the browser as you edit.
In terminal:
Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.
The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.
<script>
// require vue-resource...
new Vue({
{ | |
"countries": [ | |
{ | |
"country": "Afghanistan", | |
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"] | |
}, | |
{ | |
"country": "Albania", | |
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"] | |
}, |
# vim style tmux config | |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |