This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Reset Parallels Desktop's trial and generate a casual email address to register a new user | |
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml | |
jot -w pdu%d@gmail.com -r 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Main | |
# main | |
snippet main | |
int main(int argc, const char *argv[]) | |
{ | |
${0} | |
return 0; | |
} | |
# main(void) | |
snippet mainn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 #指定api版本,此值必须在kubectl api-versions中 | |
kind: Pod #指定创建资源的角色/类型 | |
metadata: #资源的元数据/属性 | |
name: web04-pod #资源的名字,在同一个namespace中必须唯一 | |
labels: #设定资源的标签,详情请见http://blog.csdn.net/liyingke112/article/details/77482384 | |
k8s-app: apache | |
version: v1 | |
kubernetes.io/cluster-service: "true" | |
annotations: #自定义注解列表 | |
- name: String #自定义注解名字 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
from select import select | |
# This class represents a generic yield event in the scheduler | |
class YieldEvent: | |
def handle_yield(self, sched, task): | |
pass | |
def handle_resume(self, sched, task): | |
pass | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```python | |
def_op('STOP_CODE', 0) | |
def_op('POP_TOP', 1) | |
def_op('ROT_TWO', 2) | |
def_op('ROT_THREE', 3) | |
def_op('DUP_TOP', 4) | |
def_op('ROT_FOUR', 5) | |
def_op('NOP', 9) | |
def_op('UNARY_POSITIVE', 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dis, marshal, struct, sys, time, types | |
def show_file(fname): | |
f = open(fname, "rb") | |
magic = f.read(4) | |
moddate = f.read(4) | |
modtime = time.asctime(time.localtime(struct.unpack('I', moddate)[0])) | |
print "magic %s" % (magic.encode('hex')) | |
print "moddate %s (%s)" % (moddate.encode('hex'), modtime) | |
code = marshal.load(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
from select import select | |
# This class represents a generic yield event in the scheduler | |
class YieldEvent: | |
def handle_yield(self, sched, task): | |
pass | |
def handle_resume(self, sched, task): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Descriptor { | |
// serialize value to string; | |
stringify?(value: any): string; | |
// deserialize value from string; | |
parse?(value: string): any; | |
} | |
interface DescriptorMap { | |
[fieldName: string]: Descriptor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x51B28Bea45646924137d81065f7E7c74F8c65f06 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input{ | |
tcp { | |
port => 5050 | |
} | |
# can log from console | |
#stdin{} | |
# can get log from file | |
#file{ | |
# # can be a list like ["a", "b", "*.c"] | |
# path => "/Users/xudy/workspace/moocnd/logs/elapsed.log" |
NewerOlder