start new:
tmux
start new with session name:
tmux new -s myname
| Tricks to add encrypted private SSH key to .travis.yml file | |
| To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21 | |
| base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64 | |
| ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)" | |
| split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_ | |
| language: ruby | |
| rvm: | |
| - 1.9.3 | |
| before_install: | |
| - openssl aes-256-cbc -K $encrypted_755628117be5_key -iv $encrypted_755628117be5_iv | |
| -in travis_ci_ec2.pem.enc -out ~/.ssh/travis_ci_ec2.pem -d | |
| - chmod 600 ~/.ssh/travis_ci_ec2.pem | |
| install: | |
| - bundle install --without vagrant | |
| - bundle exec berks install |
You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:
$ ipmitool -U <redacted> -P <redacted> -H 10.4.0.10 raw 0x30 0x21 | tail -c 18
00 25 90 f0 be ef| # A demonstration of the CurveCP handshake protocol. This protocol has many | |
| # favorable security properties described at http://curvecp.org. | |
| # | |
| # In addition to its security advantages, it has the following favorable properties: | |
| # * Needs only 2 messages (1 from client, 1 from server) before application | |
| # messages can be exchanged (3 before the server can send application messages) | |
| # * Does not require the server to keep protocol state between handshake messages. | |
| # | |
| # An overview of the protocol: | |
| # |
| package main | |
| import "fmt" | |
| type F func(i int) int | |
| func (f F) compose(inner F) F { | |
| return func(i int) int { return f(inner(i)) } | |
| } |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #!/usr/bin/env ruby | |
| require 'json' | |
| require 'yaml' | |
| input = $stdin.read | |
| data = YAML::load(input) | |
| json = JSON.dump(data) |
| /usr/sbin/tcpdump -nnt -r tmp.pcap | egrep '[S]' | awk -F '.' '{print $1"."$2"."$3"."$4}\' | sort | uniq -c | sort -nr | head |
| require 'ipaddr' | |
| def crc16(buf) | |
| crc = 0x00 | |
| buf.each_byte do |b| | |
| print "b: #{b}\n" | |
| # ^ binary xor | |
| # >> binary right shift | |
| # & bitwise 'AND' | |
| crc = ((crc >> 8) & 0xff) ^ CRC_LOOKUP[(crc ^ b) & 0xff] |