pcxFirefox Portable 設定

mayuyu版:
改成隨身版的方法,在firefox目錄下建立一個tmemutil.ini
內容
http://pasted.co/47176121

個人設定的資料夾和暫存檔的目錄位置和其他選項可以自行修改
目前是放在同目錄的Profiles和Tmp底下
PortableDataPath=./Profiles
TmpDataPath=./Tmp
自用版:
把pcxFirefox目錄裡的tmemutil-sample.ini改成tmemutil.ini
並設定以下項目
  • Portable=1
  • PortableDataPath=./Profiles
  • TmpDataPath=./Tmp
  • Nocompatete=1

[-Fx-] pcxFirefox 43.0.2 x64/x86版已出 - 看板 Browsers - 批踢踢實業坊

Firefox 繁體中文化

將x86繁中版firefox目錄下的三個omni.ja
覆蓋到x64版對應的目錄下,即可完成中文化。
安裝語言套件也可以 之所以推薦用omni.ja覆蓋的方式
是因為官方的繁體中文版為了修正一些繁中才有的bug
(例如Mactype渲染亂碼的bug)
修改了一些存在omni.ja裡的特性參數和英文版不一樣
而pcxFirefox的繁體中文版和官方繁中版相同
也有特別修正這些特性 如果裝英文版就沒有特別修正
裝了英文版再裝繁中語言套件還是無法修改到這些參數
所以才推薦繁體中文的使用者麻煩一點用覆蓋的方式

[-Fx-] pcxFirefox 43.0.2 x64/x86版已出 - 看板 Browsers - 批踢踢實業坊 Re: [-Fx-] pcxFirefox 43.0.2 x64/x86版已出 - 看板 Browsers - 批踢踢實業坊

Nexus 7 2013 (flo) 手動升級OTA更新

#Nexus 7 2013 (flo) 手動升級OTA更新流程


事前準備檔案


更新手順

  1. 確認平板已連線

adb devices

  1. 重開機進入bootloader模式

adb reboot bootloader

  1. 確認平板已連線

fastboot devices

  1. 還原recovery回上一版原廠

fastboot flash recovery recovery.img

  1. 還原system回上一版原廠

fastboot flash system system.img

  1. 還原boot回上一版原廠

fastboot flash boot boot.img

  1. 使用音量鍵選擇Recovery mode,並按下電源鈕確認

  2. 在面畫上看到一隻倒地的安卓機器人,胸口還有三角形警告標示

  3. 按住電源鈕,然後按音量鍵上一下,就會進入Recovery,且跳出選單

  4. 使用音量鍵選擇Apply update from ADB,並按下電源鈕確認

  5. 刷入更新包

adb sideload update.zip

  1. 使用音量鍵選擇reboot bootloader,並按下電源鈕確認
  2. 刷入TWRP

fastboot flash recovery twrp-2.8.7.0-flo.img

  1. 使用音量鍵選擇Recovery mode,並按下電源鈕確認
  2. 進入TWRP,清除Dalvik-CacheCache
  3. 選擇Install,刷入BETA-SuperSU-v2.66.zip

#Reference

Jpg壓縮比90

$sw = [system.diagnostics.stopwatch]::startNew()
$imgs = get-childitem -path 'C:\2015-11-27' -include *.jpg -recurse
foreach($img in $imgs) {
$Q = C:\identify.exe -format %Q $img
#JPG壓縮比大於90
if($Q -gt 90) {
Write-Host $img.name $Q
C:\convert.exe -quality 90 $img $img
}
}
$sw.Stop()
Write-host Total ElapsedTime: $sw.Elapsed.TotalSeconds Seconds
view raw Jpg90.ps1 hosted with ❤ by GitHub

Xuite Album

var request = require('request').defaults({
encoding: null,
method: 'GET',
headers: {
'User-Agent': 'Mozilla / 5.0(Windows NT 6.1; rv: 35.0) Gecko / 20100101 Firefox / 35.0'
}
});
var cheerio = require('cheerio');
var process = require('child_process');
function getImgLink(link, imgs, cb) {
//第一次呼叫
if (arguments.length < 3) {
cb = imgs;
imgs = [];
}
request({
url: link
}, function(error, res, body) {
if (error) {
console.log(error);
} else {
var $ = cheerio.load(body);
//console.log('第%s頁', $('.page font').html());
//console.log('本頁有%s張照片', $('.photo_cover').length);
var imgTiles = $('.photo_info_title a');
$('.photo_item .photo_cover').each(function(i, elem) {
var elem = $(elem);
var img = {
link: /(\d*)_c/.exec(elem.attr('src'))[1],
title: $(imgTiles[i]).text()
}
imgs.push(img);
});
var nextPage = $('#nav-next').attr('href');
if (!nextPage) {
return cb(null, imgs);
} else {
//console.log('有下一頁:%s', $('#nav-next').attr('href'));
//console.log('===Next Page===');
getImgLink(nextPage, imgs, cb);
return;
}
return cb(null, imgs);
}
});
}
getImgLink('http://photo.xuite.net/ilovebmilk/3497656', function(err, imgs) {
if (err) {
console.log(err);
}
for (var i = 0; i < imgs.length; i++) {
//console.log(imgs[i].title);
//console.log('http://o.0.photo.xuite.net/0/3/9/d/ilovebmilk/3543468/' + imgs[i].link + '.jpg');
var filePath = 'C:/ilovebmilk/陸/' + imgs[i].title;
var link = 'http://o.0.photo.xuite.net/0/3/9/d/ilovebmilk/3497656/' + imgs[i].link + '.jpg';
//需設定referer
process.exec('C:/wget.exe -O "' + filePath + '" ' + link, function(error, stdout, stderr) {
if (error) throw error;
});
}
});
view raw xuite_album.js hosted with ❤ by GitHub

Nexus 7 2013 (flo) 安裝Factory Images

Nexus 7 2013 (flo) 安裝Factory Images

事前準備

Factory Images for Nexus Devices
下載對應版本檔案,例:"razor" for Nexus 7 [2013] (Wi-Fi) → 6.0.0 (MRA58V)

  1. 開啟USB偵錯 (設定→開發者選項→USB偵錯)
  2. USB線連接電腦
  3. 進入Bootloader模式

開機狀態,輸入 adb reboot bootloader
關機狀態,使用 Vol Down + Power

  1. 輸入 fastboot devices,確認裝置已連線
  2. 如果未解鎖,輸入 fastboot oem unlock(註:解鎖會清空個人資料)

接下來分成自動刷入、手動刷入

自動刷入

執行 flash-all.bat 即可
註:如需保留資料請修改flash-all.bat部份內容,如下

-w刪除
fastboot -w update image-razor-mra58v.zip

手動刷入

  1. 將image-razor-mra58v.zip解壓縮

  2. 刷入bootloader
    fastboot flash bootloader bootloader-flo-flo-04.05.img

  3. 重新啟動bootloader
    fastboot reboot-bootloader

  4. 刷入system
    fastboot flash system system.img

  5. 刷入boot
    fastboot flash boot boot.img

  6. 刷入recovery
    fastboot flash recovery recovery.img

  7. 刷入cache
    fastboot flash cache cache.img

  8. 完全清除個人資料,請刷入userdata.img
    fastboot flash userdata userdata.img

  9. 重新開機 fastboot reboot

  10. 耐心等待,進入開機畫面


刷入TWRP

  1. 進入Bootloader模式

  2. 刷入TWRP
    fastboot flash recovery twrp-2.8.7.0-flo.img

  3. 音量鍵選擇 restart bootloader,並按下電源鈕確認,就會進入TWRP


Reference

讀取KML

#取得目錄裡全部KML檔
$kmls = get-childitem C:\河濱KML\*.kml
foreach ($kml in $kmls){
#讀出KML內容
[xml]$doc = Get-Content $kml -Encoding UTF8
#讀出Placemark節點
$marks=Select-Xml -xml $doc -XPath "//kml:Placemark" -Namespace @{kml="http://www.opengis.net/kml/2.2"}
#將Palcemark節點匯出成txt(以name節點為檔名)
$marks | foreach {
$text=$_.node.OuterXML
$filename=$_.node.name
Add-Content D:\$filename.txt $text
}
}
view raw Read KML.ps1 hosted with ❤ by GitHub