I hereby claim:
- I am tzangms on github.
- I am tzangms (https://keybase.io/tzangms) on keybase.
- I have a public key whose fingerprint is 599D 62E0 EF68 B7EA DA68 4C9D 0CCB 4456 9C3B BCF1
To claim this, I am signing this object:
$(function() { | |
var uploader = new plupload.Uploader({ | |
runtimes : 'flash,html5,silverlight,html4', | |
url : plupload_url, | |
browse_button : 'pickfiles', | |
container : 'plupload_container', | |
max_file_size : '150mb', | |
chunk_size: '1mb', | |
multipart: true, | |
unique_names : true, |
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom"> | |
<channel> | |
{% if podcast.new_feed_url %}<itunes:new-feed-url>{{ podcast.new_feed_url }}</itunes:new-feed-url>{% endif %} | |
<atom:link href="http://{{ request.get_host }}{{ podcast.get_absolute_url }}rss/" rel="self" type="application/rss+xml" /> | |
<title><![CDATA[{{ podcast.title|striptags|fix_ampersands }}]]></title> | |
<link>http://{{ request.get_host }}{{ podcast.get_absolute_url }}</link> | |
<description><![CDATA[{{ podcast.description|striptags|fix_ampersands }}]]></description> | |
<language>zh-TW</language> |
I hereby claim:
To claim this, I am signing this object:
@detail_route() | |
def posts(self, request, pk=None): | |
""" | |
Photos of current user | |
""" | |
user = self.get_object() | |
photos = Photo.objects.filter(user=user) | |
queryset = self.paginate_queryset(photos) |
location ~ ^/(.*)$ { | |
resolver 8.8.8.8 valid=300s; | |
resolver_timeout 10s; | |
set $s3_bucket '<bucket-name>.com.s3.amazonaws.com'; | |
set $url_full '$1'; | |
proxy_pass http://$s3_bucket/$url_full; | |
proxy_buffering off; | |
proxy_set_header Host $s3_bucket; |
// Find line 386, in amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php | |
$s3client = $this->get_s3client( $region ); | |
// Add this line below | |
$s3client->setRegion('ap-northeast-1'); |
import os.path | |
from fabric.api import run, env, put | |
from fabric.context_managers import cd | |
from fabric.api import local | |
from datetime import datetime | |
from cuisine import * | |
ROOT_PATH = os.path.dirname(__file__) |
#!/bin/sh | |
export MYSQL_HOST=<your-mysql-host> | |
export MYSQL_USER=<your-mysql-username> | |
export MYSQL_PASSWORD=<your-mysql-password> | |
export NAME=<name-of-backup> | |
export DATE=`date +"%Y%m%d"` | |
export BACKUP_FILE=$NAME.$DATE.sql.gz | |
export DATABASE_SCHEMA_NAME=<database-name> | |
export S3_BUCKET=<s3-bucket-name> |
""" | |
Requirements: | |
* A Wordpress Blog | |
* Ghost export file (json). | |
* Python Packages: python-wordpress-xmlrpc | |
>>> pip install python-wordpress-xmlrpc | |
WARNING: |
#!/usr/bin/env python | |
""" | |
This script can retrieve pageviews count by month and export to a CSV file | |
Usage: | |
>> python pv.py 2013 <input.csv> <output-csv> | |
""" | |
import sys |