Emacs command summary, Thu Jul 25. link
KeyKey | Cmd |
---|
#!/usr/bin/env python | |
# -*- coding: iso-8859-1 | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
#!/bin/bash | |
CMD='cd /home/rexzhang/git/imap-forward; /home/rexzhang/local/bin/python fwd.py --log_to_stderr --log_file_prefix=/home/rexzhang/log/fwd.log' | |
export PATH=$PATH:/home/rexzhang/local/bin/ | |
alias e='emacsclient -t -a ""' | |
logger () | |
{ | |
time=`TZ="Asia/Shanghai" date +"%Y-%m-%d %T"`; | |
echo "[$time] $*" | |
} |
Emacs command summary, Thu Jul 25. link
KeyKey | Cmd |
---|
#!/usr/bin/perl -w | |
# | |
# This script was developed by Robin Barker (Robin.Barker@npl.co.uk), | |
# from Larry Wall's original script eg/rename from the perl source. | |
# | |
# This script is free software; you can redistribute it and/or modify it | |
# under the same terms as Perl itself. | |
# | |
# Larry(?)'s RCS header: | |
# RCSfile: rename,v Revision: 4.1 Date: 92/08/07 17:20:30 |
# 批量删除饭否消息之#bash#脚本。不解释。 | |
# 将其追加到 .bashrc/.bash_profile 文件, | |
# 修改ID/PASSWORD | |
# 刷新 profile 文件 | |
# 执行 rmmsg 即可删除所有所有消息。 | |
# Not for FreeBSD. | |
function rmmsg() | |
{ | |
id='fanfouname' |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import imaplib2 as imaplib | |
from email import Header | |
from email.parser import Parser | |
##USER CONFIG | |
HOST = 'imap.gmail.com' |
//if match | |
if (subject.match(/abc/)) { | |
// Successful match | |
} else { | |
// Match attempt failed | |
} | |
//get all match | |
result = subject.match(/regex/g); |
#!/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. | |
""" | |
#include <stdio.h> | |
// http://web.archive.org/web/20071224095835/http://www.openasthra.com/wp-content/uploads/2007/12/binary_trees1.c | |
typedef struct Tree Tree; | |
struct Tree | |
{ | |
Tree * left, * right; | |
int element; | |
}; |
from django.conf.urls.defaults import * | |
from django.http import HttpResponse | |
''' | |
if required, please add the last 2 lines to settings.py: | |
MIDDLEWARE_CLASSES = ( | |
'django.middleware.common.CommonMiddleware', | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
# 'django.middleware.csrf.CsrfViewMiddleware', | |
'django.contrib.auth.middleware.AuthenticationMiddleware', |