- CNC Server: 192.168.1.12:23 (cnc.local:23)
- Report Server: 192.168.1.12:48101 (cnc.local:48101)
- Loader Server: 192.168.1.13
- Bot Binary Host: http://192.168.1.13:80/bins/mirai.*
There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.
- ffmpeg
- macOS:
brew install ffmpeg - Ubuntu/Debian:
apt install ffmpeg
- macOS:
| #!/bin/bash | |
| # Tom Hale, 2016. MIT Licence. | |
| # Print out 256 colours, with each number printed in its corresponding colour | |
| # See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163 | |
| set -eu # Fail on errors or undeclared variables | |
| printable_colours=256 |
| #!/bin/bash | |
| # | |
| # Script for updating DNS records on Hurricane Electirc's DNS system (https://dns.he.net). | |
| # | |
| # The record will be updated with the IP address that originates the request. | |
| # | |
| # Usage | |
| # ----- | |
| # | |
| # Create config file `/etc/he-dns-update.conf`: |
| " XDG Environment For VIM | |
| " ======================= | |
| " | |
| " References | |
| " ---------- | |
| " | |
| " - http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables | |
| " - http://tlvince.com/vim-respect-xdg | |
| " - https://gist.github.com/kaleb/3885679 (the original version) | |
| " |
| var linksLength = document.getElementsByClassName("twitter-timeline-link").length; | |
| for (var i = 0; i < linksLength; i++) { | |
| var link = document.getElementsByClassName("twitter-timeline-link")[i]; | |
| if (link.getAttribute("data-ultimate-url")) | |
| link.setAttribute("href", link.getAttribute("data-ultimate-url")); | |
| else | |
| link.setAttribute("href", link.getAttribute("data-expanded-url")); | |
| } |
| func (m *MersenneTwister) Urand32() uint32 { | |
| if m.index == 0 { | |
| m.generate_numbers() | |
| } | |
| y := m.State[m.index] | |
| y = y ^ (y >> 11) // | |
| y = y ^ ((y << 7) & 2636928640) // | |
| y = y ^ ((y << 15) & 4022730752) // | |
| y = y ^ (y >> 18) // "y XOR leftmost 14 bits of y" |
In the mid-80s, while reading through my roommate's collection of Scientific American back issues, I encountered this introduction to Lisp written by Douglas Hofstadter. I found it very charming at the time, and provide it here (somewhat illegally) for the edification of a new generation of Lispers.
In a testament to the timelessness of Lisp, you can still run all the examples below in emacs if you install these aliases:
(defalias 'plus #'+)
(defalias 'quotient #'/)
(defalias 'times #'*)
(defalias 'difference #'-)| # This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do | |
| # Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz | |
| # http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/ | |
| import string | |
| import zlib | |
| import sys | |
| import random | |
| charset = string.letters + string.digits + "%/+=" |