This file contains 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
<?php | |
`curl -s "http://data.taipei/opendata/datalist/apiAccess?scope=resourceAquire&rid=f4a75ba9-7721-4363-884d-c3820b0b917c&format=csv" -o pet-tpe.csv`; | |
$data = file_get_contents('pet-tpe.csv'); | |
$data = iconv('BIG5', 'UTF-8', $data); | |
file_put_contents('pet-tpe.csv', $data); |
This file contains 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
<?php | |
$page = 0; | |
$output = ''; | |
`echo '' > /tmp/animal`; | |
while(1) { | |
$url = 'http://animalprotection.hchg.gov.tw/sca/C/Animal.aspx?page='.$page; | |
$doc = new DOMDocument(); | |
$new = new DOMDocument(); | |
$html = @file_get_contents($url); |
This file contains 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
#!/bin/env bash | |
_ansible_playbook() { | |
local current_word=${COMP_WORDS[COMP_CWORD]} | |
local previous_word=${COMP_WORDS[COMP_CWORD - 1]} | |
if [[ "$current_word" == -* ]]; then | |
_ansible_complete_options "$current_word" | |
elif [[ "$current_word" == @* ]]; then | |
_ansible_target "$current_word" |
This file contains 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
<?php | |
$BASE = "/mnt/tmp"; | |
$line = file_get_contents("$BASE/tmpline"); | |
preg_match("/^\d+,/", $line, $matches); | |
$id_dest = trim($matches[0], ','); | |
$line = str_replace($matches[0], '', $line); | |
$meta = json_decode($line, TRUE); |
This file contains 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
msgid "File extensions" | |
msgstr "副檔名" | |
msgid "Taxonomy settings" | |
msgstr "分類設定" | |
msgid "Cacheable" | |
msgstr "可快取" | |
msgid "Processor" |
This file contains 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
<?php | |
civicrm_initialize(); | |
$pid = 1; // payment processor id from system | |
$payment_processor = CRM_Core_BAO_PaymentProcessor::getPayment($pid, 'live'); | |
$contribution_trxn_id = 'ABCDE12345'; | |
if($payment_processor['payment_processor_type'] == 'ALLPAY' || $payment_processor['payment_processor_type'] == 'ALLPAYX'){ | |
if(!empty($payment_processor['url_recur']) && !empty($payment_processor['user_name'])){ | |
$processor = array( | |
'password' => $payment_processor['password'] |
OlderNewer