This file contains hidden or 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
### ipython | |
Python 2.7.10 (default, Oct 23 2015, 19:19:21) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 2.3.0 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
This file contains hidden or 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 I deploy a new machine N (such as a Eucalyptus test node) I want to log into from my machine M, | |
here's what I do to set up passwordless logins, get my personal .bashrc on the system, | |
and set up the prompt so I know what machine I'm talking to. | |
One-time setup: | |
--------------- | |
On machine M: | |
Add your id_rsa.pub and id_rsa files to your ~/.ssh directory. |
This file contains hidden or 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
// Add the "LPT" section to this method (or similarly for other the other run...() methods in this class). | |
// Existing code as of 17-Jan-2017 from eucalyptus/clc/modules/core/src/main/java/edu/ucsb/eucalyptus/util/SystemUtil.java | |
//... | |
public static int runAndGetCode(String[] command) { | |
boolean hasTicket = maybeRestrictedOp( command ); | |
try | |
{ | |
String commandString = ""; | |
for(String part : command) { |
This file contains hidden or 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
Create a lot of snaps, serially or in parallel: | |
snaps-create.sh | |
====================== | |
#!/bin/bash | |
set -x | |
VOLUME=$1 | |
NUMSNAPS=$2 | |
PARALLEL=$3 | |
echo Creating $NUMSNAPS snapshots on volume $VOLUME | |
if [ -n "$PARALLEL" ]; then |
This file contains hidden or 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 | |
VLED=/var/log/eucalyptus/cloud-debug.log | |
rm -f $VLED.10 | |
for ((i=9; i>0; i--)) ; do | |
j=$((i+1)) | |
mv $VLED.$i $VLED.$j | |
done | |
mv $VLED $VLED.1 |
This file contains hidden or 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
It's a PITA to delete all items in an AWS DynamoDB table without deleting the table. | |
True, you can delete and re-create the table, but resource ARNs will change (like DyanmoDB Streams), which | |
can disrupt other resources depending on those ARNs. | |
I found https://www.npmjs.com/package/dynamodb-empty which does (most of) the job. | |
Note: | |
1. The README there is wrong, as of this writing. The correct syntax is: | |
$ dynamodb-empty --table {tablename} |