User-initiated reverse support shell via OpenSSL from a host user behind a firewall to the guest.
- Both parties run:
| # Usage | |
| # $ python sqs_to_sns.py my-queue-name | |
| import boto3 | |
| import sys | |
| import queue | |
| import threading | |
| from datetime import datetime | |
| import json |
| import discord | |
| from discord.ext import commands | |
| import sys, traceback | |
| """This is a multi file example showcasing many features of the command extension and the use of cogs. | |
| These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic | |
| understanding and platform for creating your own bot. | |
| These examples make use of Python 3.6.2 and the rewrite version on the lib. |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| #server | |
| import socket | |
| import threading | |
| import time | |
| SIZE = 4 | |
| soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | |
| soc.bind(('127.0.0.1',5432)) | |
| soc.listen(5) |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |