Skip to content

Instantly share code, notes, and snippets.

View JokerQyou's full-sized avatar

Joker_ JokerQyou

View GitHub Profile
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@chuangbo
chuangbo / README.md
Last active June 19, 2023 04:48
Python dynamic DNSPod DNS Script

替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获取 API Token 的方式

获得 domain_id 可以用 curl

curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`
@andrewbunday
andrewbunday / gist:1358794
Created November 11, 2011 18:30
Greenlet based PyQt and Flask application
#!/usr/bin/env python
import sys
import time
from flask import Flask
from PyQt4 import QtCore, QtGui, QtWebKit
import gevent.wsgi
@turicas
turicas / attrdict.py
Created December 22, 2011 16:21
Python class with dict-like get/set item
#!/usr/bin/env python
# coding: utf-8
class AttrDict(object):
def __init__(self, init=None):
if init is not None:
self.__dict__.update(init)
def __getitem__(self, key):
return self.__dict__[key]
@zhangchunlin
zhangchunlin / setiptables.py
Created December 23, 2011 09:46
a little python script using to set iptables
#! /usr/bin/env python
#coding=utf-8
#----config part----
INIT_CMDS = ["iptables -F",#clean all
"iptables -X",
"iptables -t nat -F",
"iptables -t nat -X",
"iptables -P INPUT DROP",#forbid all
"iptables -A INPUT -i lo -j ACCEPT"#accept all localhost
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@efeminella
efeminella / enhance.helper.js
Created March 14, 2012 04:57
Plain text URL to anchor tags Handlebars Helper
// Plain text URL to anchor tags Handlebars Helper
(function(){
// defines markup enhancement regex
var protocol = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim
, scheme = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
/*
* Registers a Helper method with handlebars which, given a string of
* plain text or existing markup, provides enhancements of plain text
@abeluck
abeluck / gpg-offline-master.md
Last active October 22, 2023 02:59 — forked from KenMacD/cmd.md
GPG Offline Master Key w/ smartcard
@tpulmano
tpulmano / gist:4349575
Created December 20, 2012 23:36
PyQt4 Drag And Drop Example
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import Qt
class DragFromWidget(QtGui.QDockWidget):
def __init__(self, parent=None):
super(DragFromWidget, self).__init__(parent=parent)
@yefuchs
yefuchs / gfw_contributors.md
Last active March 4, 2024 05:24
GFW Contributers

#The Great Firewall (GFW) Contributors List

注:数据来源为 dblp 和 cndblp, 下面括号中的数字表示 dblp 中显示的跟方滨兴合作论文的数量

###Binxing Fang (方滨兴)

中国工程院院士,北京邮电大学教授,中国科学院计算技术研究所网络方向首席科学家
http://en.wikipedia.org/wiki/Fang_Binxing