Skip to content

Instantly share code, notes, and snippets.

@sabottenda
sabottenda / 00-README.md
Last active August 29, 2015 14:13
Docker Cluster Management周りについて調査
@sabottenda
sabottenda / _lxc
Last active September 28, 2019 20:39
lxc zsh completion
#compdef lxc-start lxc-stop lxc-console lxc-restart lxc-create lxc-destroy lxc-monitor lxc-cgroup lxc-checkpoint lxc-execute lxc-freeze lxc-unfreeze lxc-info lxc-netstat lxc-ps lxc-wait
#=====================================================================================================
# original source is here: https://lists.linuxcontainers.org/pipermail/lxc-devel/2010-April/001172.html
#=====================================================================================================
_lxc_containers() {
local -a containers
containers=( $(/bin/ls /var/lib/lxc) )
compadd "$@" -a containers
@sabottenda
sabottenda / libclang_function.txt
Created December 6, 2013 05:24
libclang all functions
** Physical source locations
CINDEX_LINKAGE CXSourceLocation clang_getNullLocation (void)
CINDEX_LINKAGE unsigned clang_equalLocations (CXSourceLocation loc1, CXSourceLocation loc2)
CINDEX_LINKAGE CXSourceLocation clang_getLocation (CXTranslationUnit tu, CXFile file, unsigned line, unsigned column)
CINDEX_LINKAGE CXSourceLocation clang_getLocationForOffset (CXTranslationUnit tu, CXFile file, unsigned offset)
CINDEX_LINKAGE int clang_Location_isInSystemHeader (CXSourceLocation location)
CINDEX_LINKAGE int clang_Location_isFromMainFile (CXSourceLocation location)
CINDEX_LINKAGE CXSourceRange clang_getNullRange (void)
CINDEX_LINKAGE CXSourceRange clang_getRange (CXSourceLocation begin, CXSourceLocation end)
CINDEX_LINKAGE unsigned clang_equalRanges (CXSourceRange range1, CXSourceRange range2)
@sabottenda
sabottenda / wb.c
Created November 10, 2013 15:33
websocket bench with libwebsockets
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <memory.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <sys/types.h>
#include <sys/ipc.h>
(require 'package)
;; package directory
(setq package-user-dir "~/local/common/emacs/package")
; Add package-archives
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)