Programming Resources Jan 01, 0001 索引 ANDROID ANGULAR BOOTSTRAP C# C/C++ CASSANDRA CHROME CLOJURE COUCHDB D DAPPER DEVOPS DOCKER ERLANG FIREFOX GIT GO HADOOP HASKELL HTML5 IOS JAVA JAVASCRIPT LINUX LISP LUA MARKDOWN MATH MEMCACHED MONGODB MYSQL NGINX NODE.JS OPENGL OPENSTACK PERL PHP POSTGRESQL PUPPET PYTHON R [RASPBERRY PI](#RASPBERRY PI) REDIS REGEX RUBY RUST SCALA SHELL SPARK STORM SWIFT VARNISH VIM WEB前端 WEB安全 WOLFRAM 开源 ...
Python __file__ not defined problem Jan 01, 0001 __file__仅在文件中运行的时候才正常,而在交互式命令行中则需要使用变通的方法: import os import inspect import sys if not hasattr(sys.modules[__name__], '__file__'): __file__ = inspect.getfile(inspect.currentframe()) print os.path.dirname(os.path.abspath(__file__))
Redhat Atomic Host Jan 01, 0001 Introduction Red Hat has announced first public beta of Red Hat Enterprise Linux 7 Atomic Host. The beta is available from Red Hat and on Amazon Web Services and Google Compute Platform. What can you expect from the Red Hat Enterprise Linux 7 Atomic Host Beta? Specifically Designed to Run Containers Red Hat Enterprise Linux 7 Atomic Host Beta provides a streamlined host platform that is optimized to run application containers. ...
reverse shell Jan 01, 0001 Listen for 8080 first Bash Some versions of bash can send you a reverse shell (this was tested on Ubuntu 10.10): PERL Here’s a shorter, feature-free version of the perl-reverse-shell: There’s also an alternative PERL revere shell here. Python This was tested under Linux / Python 2.7: PHP This code assumes that the TCP connection uses file descriptor 3. This worked on my test system. If it doesn’t work, try 4, 5, 6… ...
Setting up GRE for Kubernetes Jan 01, 0001 首先修改Docker的默认网桥: #停止Docker Daemon进程 systemctl stop docker #设置默认网桥docker0为down,并删除 ip link set dev docker0 down brctl delbr docker0 #新 ...
Something about kubernetes authentication Jan 01, 0001 You can enable kubernetes authentication by through this documentation. Then you happily access kube-apiserve by curl: # curl -k -N -X GET -H "Authorization: Basic XXXXXXXXXX" http://localhost:8080/api/v1/namespaces/default/pods { "kind": "PodList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/namespaces/default/pods", "resourceVersion": "74034" }, "items": [] } Nothing blocks this request! What is wrong? Wait a moment and checkout kubernetes documentation, I find this: The Kubernetes API is served by the Kubernetes apiserver process. Typically, there is one of these running on a single kubernetes-master node. ...
Stateless Floating IPs Jan 01, 0001 Neutron里面的Floating IPs目前是基于iptables NAT来实现的,它使用ip_conntrack来跟踪所有连接(五元组), ...
sysdig Jan 01, 0001 Sysdig captures system calls and other system level events using a linux kernel facility called tracepoints, providing a rich set of real-time, system-level information. Sysdig “packetizes” this information, so that you can do things like save it into trace files and easily filter it, a bit like you would do with tcpdump. This makes it very flexible to explore what processes are doing. Sysdig instruments your physical and virtual machines at the OS level by installing into the Linux kernel and capturing system calls and other OS events. ...
Upgrade CentOS kernel Jan 01, 0001 终于耐不住要升级下kernel了,目前epel提供两个版本: kernel-lt (4.4)和kernel-ml (4.5): The kernel-ml packages are built from the sources available from the “mainline stable” branch of The Linux Kernel Archives (external link). The kernel ...
Use kubectl to connect kubernetes cluster Jan 01, 0001 kubectl is the main tool to interact with Kubernetes cluster. It connects to http://localhost:8080 with no auth by default. But how can we use kubectl with auth? Pretty simple, just config kubectl with dedicated cluster: kubectl config set-credentials default --username=username --password=password kubectl config set-cluster default --server=https://kubernetes-master:6443 --insecure-skip-tls-verify=true kubectl config set-context default --cluster=default --user=default kubectl config use-context default