This file contains 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
#!/usr/bin/python | |
#-*- coding: UTF-8 -*- | |
import re | |
import os | |
import sys | |
import json | |
import requests | |
import urlparse | |
import logging |
This file contains 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
#!/usr/bin/python | |
#-*- coding: UTF-8 -*- | |
import os | |
import re | |
import sys | |
import json | |
import requests | |
import urlparse | |
import logging |
This file contains 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
#!/usr/bin/python | |
''' | |
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb | |
to be extended with Python code e.g. for library-specific data visualizations, | |
such as for the C++ STL types. Documentation on this API can be seen at: | |
http://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html | |
This python module deals with the case when the process being debugged (the | |
"inferior process" in gdb parlance) is itself python, or more specifically, |
This file contains 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
objs = jQuery(".evenhide, .oddhide"); | |
for ( var i = 0; i < objs.length; ++ i ) { | |
t = objs[i]; | |
n = "deleteItem_" + t.getAttribute("asin"); | |
Fion.deleteItem( n ); | |
} |
This file contains 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
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <poll.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains 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
int connection_refused() | |
{ | |
int sockfd = async_net("127.0.0.1", 11111); | |
struct pollfd pfd; | |
pfd.fd = sockfd; | |
pfd.events = POLLIN|POLLOUT; | |
int ready = poll(&pfd, 1, -1); | |
printf("ready=%d, POLLIN=%d, POLLOUT=%d, POLLERR=%d\n", | |
ready, | |
( pfd.revents&POLLIN ) != 0, |