Skip to content

Instantly share code, notes, and snippets.

Avatar

frank0718

  • tencent
  • beijing
View GitHub Profile
View SimpleHTTPServerWithUpload.py
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
View get_banner.sh
for i in {1..227};do curl -qs http://www.kammerl.de/ascii/AsciiSignature.php -X POST -F 'figlettext=CPO' -F figletfont=$i -F "Style=2" -x 127.0.0.1:8118 |pup 'small'; done > banner.txt
curl -qs http://www.kammerl.de/ascii/AsciiSignature.php -X POST -F 'figlettext=HELLO WORLD' -F figletfont=20 -F "Style=2" -x 127.0.0.1:8118 |pup 'small'
denpend pup
View goquery-example.go
package main
/*
* Script that scrapes google front page
* Usage: ./google [<query>]
* e.g. ./google hacker news
*/
import (
"fmt"