Skip to content

Instantly share code, notes, and snippets.

@1060460048
1060460048 / requests.py
Last active August 29, 2015 14:06 — forked from Chairo/requests.py
# -*- coding:utf-8 -*-
import requests
from time import sleep
from threading import Thread
UPDATE_INTERVAL = 0.01
class URLThread(Thread):
def __init__(self, url, timeout=10, allow_redirects=True):
super(URLThread, self).__init__()
@1060460048
1060460048 / Copyer.py
Last active August 29, 2015 14:06 — forked from Chairo/Copyer.py
# -*- coding:utf-8 -*-
import requests, os, re, sys, time
from time import sleep
from threading import Thread
reload(sys)
sys.setdefaultencoding('utf8')
UPDATE_INTERVAL = 0.01
@1060460048
1060460048 / bigpic.py
Last active August 29, 2015 14:07 — forked from cwoebker/bigpic.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
*********************************************
The Beauty of Boston's Big Picture albums.
by Cecil Woebker (http://cwoebker.com)
*********************************************
Usage:
$ ./bigpic.py
# EDIT: 2013/10/20
# google has updated its kwt UI, this script doesn't work any more!
# may be I will update this script when I have time to investigate their new Interface.
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
import selenium.webdriver.support.wait
selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05
import re
@1060460048
1060460048 / phpstorm
Last active August 29, 2015 14:12 — forked from luxixing/phpstorm
快捷键:
ctrl+tab: switcher,在已打开文件之间或者工具窗口间切换
alt+alt: 连续两次快速按下alt键不放,显示tool windows(project,database ...)
ctrl+k: 快速调用 commit changes 对话框
alt+F3: 显示搜索窗格,对当前文件进行搜索,然后配合ctrl+alt+r,可以进行替换操作
ctrl+shift+f: find in path 在指定文件夹或者整个project内搜索,ctrl+shift+r进行替换操作
ctrl+shift+alt+t: 快速rename,里面有好几个选项,慢慢理解吧
shift+F6: rename,自动重命名该变量所有被调用的地方
ctrl+shift+n: 快速导航到指定文件,弹出一个dialog,输入文件名即可
@1060460048
1060460048 / imdb_details_page_spider.py
Created August 7, 2016 13:47 — forked from premit/imdb_details_page_spider.py
Scrapy reference: Crawling scraped links & next pagination
'''
Spider for IMDb
- Retrieve most popular movies & TV series with rating of 8.0 and above that have at least 5 award nominations
- Crawl next pages recursively
- Follow the details pages of scraped films to retrieve more information of each film
'''
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
@1060460048
1060460048 / imdb_next_page_spider.py
Created August 7, 2016 13:47 — forked from premit/imdb_next_page_spider.py
Scrapy reference: Crawling next pagination
'''
Spider for IMDb
- Retrieve most popular movies & TV series with rating of 8.0 and above
- Crawl next pages recursively
'''
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
@1060460048
1060460048 / node_alipay.js
Created August 16, 2016 05:08 — forked from Gaubee/node_alipay.js
nodejs·支付宝·即时到帐接口
/* *
*类名:AlipayConfig
*功能:基础配置类
*详细:设置帐户有关信息及返回路径
*版本:3.2
*日期:2011-03-17
*说明:
*以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
*该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
@1060460048
1060460048 / kdg-bot.php
Created December 14, 2016 07:55 — forked from msmuenchen/kdg-bot.php
Automatic login bot for Kabel Deutschland 30-Min Free Wifi Hotspot
<?php
/*
Kabel Deutschland 30-Min Free Wifi Hotspot Auto-Login bot for Linux and Windows
According to the ToC, there is nothing which forbids the usage of this tool, but you have to accept and act by them.
See https://www.hotspot.kabeldeutschland.de/portal/nutzungsbedingungen.html?profile=2 for details.
Windows Install:
1) Install PHP
1.1) Grab and unpack http://windows.php.net/downloads/releases/php-5.5.3-nts-Win32-VC11-x86.zip

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup