start new:
tmux
start new with session name:
tmux new -s myname
| """ | |
| Determine IPv4 addresses on a Linux machine via the socket interface. | |
| Thanks @bubthegreat the changes to make it Py2/3 compatible and the helpful | |
| code comments: https://gist.github.com/pklaus/289646#gistcomment-2396272 | |
| This version has all comments removed for brevity. | |
| """ | |
| import socket | |
| import array | |
| import struct |
| gcc -fpic --shared $(python-config --includes) greetmodule.c -o greetmodule.so |
| #!/usr/bin/env/python | |
| # | |
| # More of a reference of using jinaj2 without actual template files. | |
| # This is great for a simple output transformation to standard out. | |
| # | |
| # Of course you will need to "sudo pip install jinja2" first! | |
| # | |
| # I like to refer to the following to remember how to use jinja2 :) | |
| # http://jinja.pocoo.org/docs/templates/ | |
| # |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
| #!/bin/bash | |
| # | |
| # Binary search tree is of the form: | |
| # 10 | |
| # / \ | |
| # / \ | |
| # 4 16 | |
| # / \ / | |
| # 1 7 12 | |
| # |
| Example -1 | |
| ===================== | |
| input { | |
| file { | |
| path => [ "/usr/local/var/log/suricata/eve.json", "/var/log/ulogd.json" ] | |
| codec => json | |
| type => "json-log" | |
| } | |
| } |
ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"To remove a submodule you need to: