- Create a service file like
dash_sniffer.service
- Put it in
/lib/systemd/system/
- Reload
systemd
using command:systemctl daemon-reload
- Enable auto start using command:
systemctl enable dash_sniffer.service
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
def dict_diff(d1, d2): | |
"""Checks if all the key/values in d1 are in d2. | |
Returns True if there is a difference, i.e. | |
* There is a key in d1 that is not in d2 | |
* There is a key/value in d1 that is different in d2 | |
Otherwise, returns False. | |
""" | |
for k, v in d1.iteritems(): |
Reference: Reddit
Reference: XDA
- Create new VM (Linux Ubuntu 64-bit)
- Configure 4096MB RAM, 20GB disk
- Click "Settings">"Storage">"Controller:IDE" and add an optical drive (icon looks like an optical disk with a plus symbol). Choose the OS's ISO. This should appear above any existing optical drives and below the hard drive.
- Select the drive you just added and check the "Live CD/DVD" toggle. Then click "OK".
- We are now ready to start the machine. When you do, there should be a splash screen - press the tab key before it tries to perform a default installation. If you missed it, just power down the machine (don't save its state or send the shutdown signal, just power it off) and try again. It only gives you about 3s to press tab.
-
Stop docker daemon:
sudo systemctl stop docker
-
Override the docker daemon startup options via systemd by adding a conf file
sudo mkdir -p /etc/systemd/system/docker.service.d sudo vim /etc/systemd/system/docker.service.d/docker.conf
-
Override the
ExecStart
command and add the--bip
option
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
#!/usr/bin/env python | |
from requests_futures.sessions import FuturesSession | |
from pprint import pprint | |
from HTMLParser import HTMLParser | |
import re | |
import json | |
import sys | |
class MLStripper(HTMLParser): |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" /> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet"> | |
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script> | |
<meta charset=utf-8 /> | |
</head> | |
<body> |