Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Dropbox Uploader Script v0.8.1
#
# Copyright (C) 2010-2011 Andrea Fabrizi <[email protected]>
#
# 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.
@ShenXuGongZi
ShenXuGongZi / pytimer.py
Created May 14, 2012 19:53 — forked from HowardMei/pytimer.py
A simple sematic timestring parser with handy timer functions
#! /usr/bin/env python
## -*- coding: utf-8 -*-
################################################################
## Name: pytimer v0.0.1 Dec 12, 2011
## Notes: A sematic time string parser with handy timer functions
## Author: Howard Mei
## Email: [email protected]
## License: MIT, http://www.opensource.org/licenses/mit-license.php
################################################################
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named i18n
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
<?php
if (is_home())//首页关键字和描述,可以换成你网站的
{
$description = "小拼:致力于搜索引擎营销(SEM)研究,关注搜索引擎优化(SEO),医院网络营销,SEO技术和电子商务.";
$keywords = "SEM,搜索引擎营销,SEO,搜索引擎优化,医院网络营销";
}
elseif (is_page())//单独页面关键字和描述,WordPress默认是不显示的,考虑到单独页面也不多,这种判断形式还算快速,只要取得页面对应ID即可
{
if ($post->ID == 1)//数字1是页面的ID,查看方法:鼠标移至对应页面的“编辑”字样上,状态栏出现的链接,形如post.php?post=1&action=edit,其中post=后面的数字1就是对应页面ID
{
function getElevation(event) {
var elevator;
elevator = new google.maps.ElevationService();
var locations = [];
// Retrieve the clicked location and push it on the array
var clickedLocation = event.latLng;
locations.push(clickedLocation);
// Create a LocationElevationRequest object using the array's one value
<div class="blog_box">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('featured-blog-listing'); ?></a>
<p><?php $temp_arr_content = explode(" ",substr(strip_tags(get_the_content()),0,430)); $temp_arr_content[count($temp_arr_content)-1] = ""; $display_arr_content = implode(" ",$temp_arr_content); echo $display_arr_content; ?><?php if(strlen(strip_tags(get_the_content())) > 430) echo "[.....]"; ?></p>
</div>
// API callback
Tabletop.callbacks.tt13518507272638360({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gs":"http://schemas.google.com/spreadsheets/2006","id":{"$t":"https://spreadsheets.google.com/feeds/worksheets/0AsmHVq28GtVJdG1fX3dsQlZrY18zTVA2ZG8wTXdtNHc/public/basic"},"updated":{"$t":"2012-05-22T22:37:19.508Z"},"category":[{"scheme":"http://schemas.google.com/spreadsheets/2006","term":"http://schemas.google.com/spreadsheets/2006#worksheet"}],"title":{"type":"text","$t":"Github Timeline"},"link":[{"rel":"alternate","type":"text/html","href":"https://spreadsheets.google.com/pub?key\u003d0AsmHVq28GtVJdG1fX3dsQlZrY18zTVA2ZG8wTXdtNHc"},{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://spreadsheets.google.com/feeds/worksheets/0AsmHVq28GtVJdG1fX3dsQlZrY18zTVA2ZG8wTXdtNHc/public/basic"},{"rel":"self","type":"application/atom+xml","href":"https://spreadsheets.google.com/
{% include 'common/head.html' %}
<body>
{% include 'common/top.html' %}
<div id="Wrapper">
<div id="Main">
<div id="Sidebar">
</div>
<div id="Rightbar">
{% include 'rightbar/user.html' %}
</div>
#!/usr/bin/env python
# coding=utf-8
import os
import base64
import re
import time
import datetime
import hashlib
import httplib
location / {
auth_basic "Restricted";
auth_basic_user_file conf/htpasswd;
}
#auth_basic_user_file 指令为验证域指定了密码文件
#文件格式如下
user:pass
user2:pass2:comment
user3:pass3