Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name pixiv API
// @namespace http://efcl.info/
// @include http://www.pixiv.net/*
// ==/UserScript==
// API 資料 http://pastie.org/735195
var pxvAPI = "http://iphone.pxv.jp/iphone/"
// 検索結果のオブジェクト
var result = [];
var user = {
# Translation of the WordPress theme Twenty Ten 1.0 by the WordPress team.
# Copyright (C) 2010 the WordPress team
# This file is distributed under the same license as the Twenty Ten package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Twenty Ten 1.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twentyten\n"
@faryne
faryne / gist:1327005
Created October 31, 2011 06:22
Facebook Like button event binding
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Facebook Like Button Event Sample</title>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
@faryne
faryne / 某拍賣的資料查詢
Created November 29, 2011 09:44
某拍賣的資料查詢:假髮類
[2011-11-29 17:38:49]Parse ok(2092074126:假髮)......getting item info
Getting items list......555
parse e53069116...[2011-11-29 17:38:55]402:[2011-11-29 17:38:55]Cannot get data from Yahoo(0) while getting http://tw.page.bid.yahoo.com/tw/show/bid_hist?aID=e53069116&typ=log
parse b67478383...current_price: 000999;order_price: 000999;goods_num: 000137;price_num: 000107;bid_times: 000000;buy_num: 000002;start_price: 000999
parse d59408148...[2011-11-29 17:39:12]301:[2011-11-29 17:39:12]Current bidding price must be greater than 0
parse d59829836...current_price: 000039;order_price: 000039;goods_num: 000895;price_num: 000091;bid_times: 000000;buy_num: 000005;start_price: 000039
parse b67794942...current_price: 000299;order_price: 000299;goods_num: 000913;price_num: 000073;bid_times: 000000;buy_num: 000001;start_price: 000299
parse 1221790479...current_price: 000060;order_price: 000060;goods_num: 000904;price_num: 000070;bid_times: 000000;buy_num: 000002;start_price: 000060
parse b67660031...current_price: 000
@faryne
faryne / gist:1977508
Created March 5, 2012 08:45
利用PHP抓Youtube影片(範例程式)
<?php
/**
使用前請先下載phpQuery,
否則你需要自己改寫get_meta_data方法的內容
*/
require_once 'libraries/phpQuery.php'; // 請更改為phpQuery的位置
define('lang_ytdl02', '低品質影片', true);
define('lang_ytdl03', '標準品質影片', true);
define('lang_ytdl05', '高畫質影片', true);
@faryne
faryne / gist:2694267
Created May 14, 2012 14:22
讓使用者輸入兩個數字,並處理這兩個數字間所有數字的總和
import java.io.*;
class test {
/**
* @param args
*/
public static void main(String[] args) throws java.lang.Exception {
// TODO Auto-generated method stub
String a = "", b = "";
@faryne
faryne / gist:2694565
Created May 14, 2012 15:25
利用遞迴函數處理階乘的問題
import java.io.*;
import java.util.Scanner;
class test {
/**
* @param args
*/
public static void main(String[] args) throws java.lang.Exception {
// TODO Auto-generated method stub
@faryne
faryne / gist:2719136
Created May 17, 2012 14:05
根據使用者輸入的數字,產生一個以星號組成的塔狀圖形
import java.util.Scanner;
class test {
/**
* @param args
*/
public static void main(String[] args) throws java.lang.Exception {
// TODO Auto-generated method stub
try {
@faryne
faryne / gist:2940664
Created June 16, 2012 09:18
求吐嘲
<?php
foreach($dailyDetail[$key1] as $key2=>$value){
if($key1==0){
if($key2==0 ||$key2==1 ||$key2==2|| $key2==3 || $key2==4 || $key2==5 ||$key2==$dailyRevenueNum-2||$key2==$d ailyRevenueNum-3||$key2==$dailyRevenueNum-1){
$dailyDetail[$key1][$key2]['style']='s41';
}
else{
$dailyDetail[$key1][$key2]['style']='s42';
}
tmpdir=tmp
if [ -d "$tmpdir" ]; then
rm -rf $tmpdir
fi
mkdir $tmpdir
height=2592
width=10
n=0
for f in *.jpg
do