See http://stackoverflow.com/a/14381327/130638 for explanation.
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
When | |
[Case | |
(Deposit | |
(PK "be") | |
(Role "player1") | |
(Token "" "") | |
(Constant 15) | |
) | |
(When | |
[Case |
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
import sys | |
import tempfile | |
from pybloom_live import ScalableBloomFilter | |
try: | |
from electrum import SimpleConfig | |
from electrum.keystore import from_seed | |
from electrum.tests.test_wallet_vertical import WalletIntegrityHelper | |
from electrum.util import BitcoinException |
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
[server] | |
host = 127.0.0.1 | |
api_port = 5985 | |
websocket_port = 9000 | |
workspace = agent | |
[tokens] | |
registration = TOKEN | |
[agent] |
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
printf '{"hosts":[{"ip":"127.0.0.1","description":"host description","vulnerabilities":[],"credentials":[],"services":[{"name":"http","protocol":"tcp","port":80,"vulnerabilities":[{"name":"vuln test from agent","severity":"high","desc":"vuln desc","type":"Vulnerability"}]}]}]}}' |
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
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
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
# example taken from https://tutorials.technology/tutorials/08-How-to-check-that-file-exists-with-Python.html | |
from pathlib import Path | |
def file_or_directory(pathname): | |
file_or_directory = Path(pathname) | |
if file_or_directroty.exists(): | |
if file_or_directory.is_file(): | |
print('Filename {0} is a file!'.format(pathname) | |
else: | |
print('Filename {0} is a directory!'.format(pathname) |
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
#!/bin/bash | |
# @jsdavo 6th July 2012 | |
# Derived mainly from https://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/ | |
# @llazzaro 8th Nov 2016: Update to work with ubuntu 16 | |
# For Ubuntu 16 | |
# Get some 300MB of dependencies | |
sudo apt-get install automake autoconf libtool subversion-tools help2man | |
sudo apt-get install build-essential erlang libicu-dev |
I followed the instructions from http://blog.scottlowe.org/2014/01/23/automatically-connecting-lxc-to-open-vswitch/ but wasn't happy with the script
# pip install shyaml
# cat /var/lib/lxc/vm1/config
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
sudo apt-get install build-essential | |
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz | |
tar xf cmake-3.2.2.tar.gz | |
cd cmake-3.2.2 | |
./configure | |
make | |
git clone https://github.com/openbabel/openbabel.git | |
cd openbabel | |
mkdir build |
NewerOlder