Skip to content

Instantly share code, notes, and snippets.

@lotib
lotib / web-servers.md
Created July 15, 2018 20:57 — forked from willurd/web-servers.md
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@lotib
lotib / sms-node.js
Created March 24, 2018 13:46 — forked from dvdvck/sms-node.js
Send sms from node using ModemManager through DBus
'use strict';
const DBus = require('dbus');
const co = require('co');
let bus = DBus.getBus('system');
let mm = bus.getInterface.bind(bus, 'org.freedesktop.ModemManager1');
co(function*(){
let messaging = yield new Promise((res, rej)=>{
mm('/org/freedesktop/ModemManager1', 'org.freedesktop.DBus.ObjectManager', (err, manager)=>{
if(err){ rej(err); return }

Simple vsock setup for QEMU

Configuration

Host Kernel: rawhide 4.13.0-0.rc6.git4.2.fc28.x86_64 (on Fedora 24)

QEMU is mainline built from sources: QEMU emulator version 2.10.50 (v2.10.0-105-g223cd0e)

Guest: clear-17460-kvm.img (which has vsock support)

@lotib
lotib / qemu-debian-create-image
Created April 3, 2017 15:21 — forked from spectra/qemu-debian-create-image
Debian qemu image creation using debootstrap (automated from http://diogogomes.com/2012/07/13/debootstrap-kvm-image/ by Kamil Trzcinski (http://ayufan.eu) with some modifications by me)
#!/bin/bash
# Configs
VSYSTEM=qemu # Either 'qemu' or 'kvm'
INCLUDES='less,vim,sudo,openssh-server,acpid'
MIRROR="http://ftp.br.debian.org/debian"
ARCH=686
clean_debian() {
[ "$MNT_DIR" != "" ] && chroot $MNT_DIR umount /proc/ /sys/ /dev/ /boot/