This file contains hidden or 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 Crypto.Cipher import DES3 | |
import base64 | |
import os | |
import re | |
from os.path import expanduser | |
home = expanduser("~") | |
# costanti :) | |
REMMINA_FOLDER = home+'/'+'.remmina/' |
This file contains hidden or 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
一、键盘风格 | |
UIKit框架支持8种风格键盘 | |
``` | |
typedef enum { | |
UIKeyboardTypeDefault, // 默认键盘:支持所有字符 | |
UIKeyboardTypeASCIICapable, // 支持ASCII的默认键盘 | |
UIKeyboardTypeNumbersAndPunctuation, // 标准电话键盘,支持+*#等符号 | |
UIKeyboardTypeURL, // URL键盘,有.com按钮;只支持URL字符 | |
UIKeyboardTypeNumberPad, //数字键盘 |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <vlc/vlc.h> | |
#include <time.h> | |
#include <signal.h> | |
#define UNUSED(x) (void)(x) | |
static const char* vlcArguments[] = { |
This file contains hidden or 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 | |
from socket import AF_INET, SOCK_DGRAM | |
import sys | |
import socket | |
import struct, time | |
def getNTPTime(host = "pool.ntp.org"): | |
port = 123 | |
buf = 1024 | |
address = (host,port) |
This file contains hidden or 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
"""HTTP server base class. | |
Note: the class in this module doesn't implement any HTTP request; see | |
SimpleHTTPServer for simple implementations of GET, HEAD and POST | |
(including CGI scripts). It does, however, optionally implement HTTP/1.1 | |
persistent connections, as of version 0.3. | |
Contents: | |
- BaseHTTPRequestHandler: HTTP request handler base class |
This file contains hidden or 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
"""Framework for getting filetype-specific metadata. | |
Instantiate appropriate class with filename. Returned object acts like a | |
dictionary, with key-value pairs for each piece of metadata. | |
import fileinfo | |
info = fileinfo.MP3FileInfo("/music/ap/mahadeva.mp3") | |
print "\\n".join(["%s=%s" % (k, v) for k, v in info.items()]) | |
Or use listDirectory function to get info on all files in a directory. | |
for info in fileinfo.listDirectory("/music/ap/", [".mp3"]): |
This file contains hidden or 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
/* | |
* ===================================================================================== | |
* | |
* Filename: el.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 2014年06月19日 10时28分18秒 | |
* Revision: none |
This file contains hidden or 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 | |
#my first python script | |
import urllib2 | |
import os | |
enable_proxy = True | |
proxy_hander = urllib2.ProxyHandler({"http" : 'http://127.0.0.1:8087'}) | |
null_proxy_hander = urllib2.ProxyHandler({}) | |
if enable_proxy: | |
opener = urllib2.build_opener(proxy_hander) |
This file contains hidden or 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
find . -iname | file * | grep -i "executable" | awk -F ':' '{print $1}' | xargs git rm |