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/env python | |
# -*- coding: utf-8 -*- | |
"""Simple async crawler/callback queue based on gevent.""" | |
import traceback | |
import logging | |
import httplib2 | |
import gevent |
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
HOSTNAME=ip-72-167-112-17.ip.secureserver.net | |
RUBYPATH=/usr/bin | |
SHELL=/bin/bash | |
TERM=xterm | |
HISTSIZE=1000 | |
SSH_CLIENT=122.169.131.179 1742 22 | |
SSH_TTY=/dev/pts/1 | |
USER=amrood | |
JRE_HOME=/usr/java/jdk/jre | |
J2RE_HOME=/usr/java/jdk/jre |
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
# git svn | |
git svn clone -s repo (git svn init -T trunk -b branches -t tags repo) | |
git svn clone -T trunk repo | |
git svn clone -r 100:HEAD repo | |
git svn fetch | |
git svn rebase | |
git svn dcommit | |
branches = <svn-path>:<git-refspec> | |
branches = branches/*:refs/remotes/* |
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
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp.asm | |
global _start | |
section .text | |
_start: | |
; syscalls (/usr/include/asm/unistd_32.h) | |
; socketcall numbers (/usr/include/linux/net.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
"use strict" | |
var Promise = function () { | |
this.state = 'pending' | |
this.thenables = [] | |
} | |
Promise.prototype.resolve = function (value) { | |
if (this.state != 'pending') return | |
this.state = 'fulfilled' |
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
base { | |
// debug: connection progress & client list on SIGUSR1 | |
log_debug = on; | |
// info: start and end of client session | |
log_info = on; | |
/* possible `log' values are: | |
* stderr | |
* file:/path/to/file |
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
User-agent: Baiduspider | |
Crawl-delay: 1 | |
Allow: /article | |
Disallow: / | |
User-Agent: Googlebot | |
Crawl-delay: 1 | |
Allow: /article | |
Disallow: / |
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
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from tornado.locks import Event | |
event = Event() | |
@gen.coroutine | |
def waiter(): | |
print("Waiting for event") | |
yield event.wait() |
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
version: '2' | |
services: | |
phantomjs: | |
image: 'binux/pyspider:latest' | |
command: phantomjs | |
cpu_shares: 512 | |
environment: | |
- 'EXCLUDE_PORTS=5000,23333,24444' | |
expose: | |
- '25555' |
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
""" | |
Tiny | |
A reversible base62 ID obfuscater | |
Authors: | |
Jacob DeHart (original PHP version) and Kyle Bragger (Ruby port) | |
and Lee Semel (python port) | |
Usage: | |
obfuscated_id = to_tiny(123) | |
original_id = from_tiny(obfuscated_id) | |
Configuration: |