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
#include <variant> | |
#include <vector> | |
using namespace std; | |
class Circle; | |
class Square; | |
class DrawVisitor { | |
public: |
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 | |
import unittest | |
import pandas as pd | |
class AllTest(unittest.TestCase): | |
def test_all(self): |
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
# *** tmux subcommands *** | |
# start a new tmux session | |
tmux new-session -s [session-name] | |
# start a new tmux session with a named window | |
tmux new-session -s [session-name] -n [window-name] | |
# list running sessions |
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
# find the IP addresses of many hosts on the network | |
# step 1. obtain the broadcast address from ifconfig | |
# step 2. ping the broadcast address | |
$ ifconfig -a | grep broadcast | |
inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255 | |
inet 192.168.68.1 netmask 0xffffff00 broadcast 192.168.68.255 | |
inet 192.168.174.1 netmask 0xffffff00 broadcast 192.168.174.255 | |
$ ping 192.168.1.255 | |
PING 192.168.1.255 (192.168.1.255): 56 data bytes | |
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.634 ms |
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
# canonical sar command invocation | |
sar -f [FILE] [flags] [interval] [count] | |
# general purpose flags | |
# -f [FILE] refers to a file in /var/log/sa/saXX where XX is the day of month | |
# -o [FILE] capture all performance data in a binary file to be read with sar later | |
# Note: *all* performance counters are captured by default | |
# -p flag will pretty print device names rather than using dev{m}-{n} format | |
# when [interval] is 0 sar will report statistics for time since boot |
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 bash | |
EXPECTED_ARGS=2 | |
if [ $# -ne $EXPECTED_ARGS ] | |
then | |
echo "Usage: `basename $0` rpm-file target-dir" | |
exit 1 | |
fi |
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
### python-virtualenv-notes ### | |
Notes from virtualenv documentation on pypi http://pypi.python.org/pypi/virtualenv | |
o Install | |
o instructions for installing | |
http://www.virtualenv.org/en/latest/#installation | |
o in case you haven't already install pip | |
$ sudo apt-get install python-pip | |
OR |
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
--- | |
components: | |
# Order matters here! | |
- general | |
- db | |
- rabbit-mq | |
# Oslo libraries | |
- oslo-config | |
- oslo-messaging | |
- pycadf |
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
# reset root password | |
o Stop MySQL | |
$ sudo /sbin/service mysqld stop | |
o Restart it manually with the skip-grant-tables option: | |
$ mysqld_safe --skip-grant-tables | |
o Run the MySQL client: | |
$ mysql -u root | |
o Reset the root password manually with this MySQL command: | |
mysql> UPDATE mysql.user SET Password=PASSWORD('XXX') WHERE User='root'; | |
o Flush the privileges with this MySQL command: |
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
(rallyve)mmorais@displaytoday rally$ rally --verbose task start --deploy-id=4f449b2d-ba2d-4096-a7a8-2e77969b3bae --task dummy.json | |
/home/mmorais/rallyve/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. | |
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) | |
================================================================================ | |
Task a4ff5c81-a60d-4a34-93bc-41f25e1d337c is started | |
-------------------------------------------------------------------------------- | |
2014-06-19 17:37:17.720 24773 INFO rally.orchestrator.api [-] Benchmark Task a4ff5c81-a60d-4a34-93bc-41f25e1d337c on Deployment 4f449b2d-ba2d-4096-a7a8-2e77969b3bae | |
2014-06-19 17:37:17.720 24773 INFO rally.benchmark.engine [-] Task a4ff5c81-a60d-4a34-93bc-41f25e1d337c | Starting: Check cloud. | |
2014-06-19 17:37:18.037 24773 INFO rally.benchmark.e |
NewerOlder