<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Read Sean

    Read me, read Sean.
    posts - 508, comments - 655, trackbacks - 9, articles - 4

    2012年11月15日

    不知道從什么時(shí)候開始的,tsocks在Mac下面安裝要費(fèi)些周折,brew官方和曾經(jīng)一度存在的第三方tap都不再支持直接brew install,需要手工創(chuàng)建formula。過程倒也還OK:

    vim /usr/local/Library/Formula/tsocks.rb

    require 'formula'

    class Tsocks < Formula
      # The original is http://tsocks.sourceforge.net/
      # This GitHub repo is a maintained fork with OSX support

      homepage 'http://github.com/pc/tsocks'
      head 'https://github.com/pc/tsocks.git'

      depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3

      def install
        system "autoconf""-v"
        system "./configure""--prefix=#{prefix}""--disable-debug""--disable-dependency-tracking""--with-conf=#{config_file}"

        inreplace("tsocks") { |bin| bin.change_make_var! "LIBDIR", lib }

        system "make"
        system "make install"

        etc.install "tsocks.conf.simple.example" => "tsocks.conf" unless config_file.exist?
      end

      def test
        puts 'Your current public ip is:'
        ohai `curl -sS ifconfig.me 2>&1`.chomp
        puts "If your correctly configured #{config_file}, this should show the ip you have trough the proxy"
        puts 'Your ip through the proxy is:'
        ohai `tsocks curl -sS ifconfig.me 2>&1`.chomp
      end

      def config_file
        etc / 'tsocks.conf'
      end
    end

    有了上述formula之后,即可 brew install --HEAD tsocks 。

    posted @ 2014-05-07 23:23 laogao 閱讀(4082) | 評論 (2)編輯 收藏

    有了RPi當(dāng)然免不了要玩玩XBMC,這里推薦XBian,安裝配置過程如下:

    1- 下載.img文件 ( http://www.xbian.org/download/ );
    2- 用dd命令將.img(比如XBian_beta_2.img)寫入SD卡;
    3- 將中文字體(比如wqy-zenhei.ttc)重命名為arial.ttf,復(fù)制到SD卡的~/.xbmc/media/Fonts目錄(XBian默認(rèn)用戶為xbian,密碼raspberry);
    4- 從 https://code.google.com/p/xbmc-addons-chinese/downloads/detail?name=repository.googlecode.xbmc-addons-chinese-eden.zip 下載資源插件并復(fù)制到SD卡;
    5- 將SD卡插入RPi并連接HDMI到電視機(jī)/顯示器;
    6- RPi開機(jī),進(jìn)入XBian的配置頁面,可以校準(zhǔn)屏幕,配置網(wǎng)絡(luò)連接等;
    7- 在系統(tǒng)設(shè)置中選擇字體為Arial,語言選為中文,此時(shí)應(yīng)該看到界面可正常顯示中文;
    8- 安裝擴(kuò)展程序,選擇之前下載到SD卡的repository.googlecode.xbmc-addons-chinese-eden.zip文件,擴(kuò)展安裝成功后即可在擴(kuò)展程序列表中看到對應(yīng)的資源條目,逐一安裝即可。

    額外提示:XBMC也可以通過網(wǎng)絡(luò)共享播放視頻,之前跟大家提到過XBMC顯示中文字幕有時(shí)出現(xiàn)整行被方塊覆蓋的問題,解決方法是在字幕文件中查找并刪除或替換"…"字符。Enjoy!

    posted @ 2014-04-06 17:45 laogao 閱讀(2369) | 評論 (0)編輯 收藏


    整理一下 IntelliJ IDEA 最常用的快捷鍵,按照便于記憶的方式排列:

    Ctrl-N              Class... (find by name)
    Ctrl-Shift-N        File... (find by name)
    Ctrl-Shift-Alt-N    Symbol... (find by name)
    Ctrl-G              Line... (goto line)
    Ctrl-H              Type hierarchy (hierarchy)
    Ctrl-Shift-H        Method hierarchy (hierarchy)
    Ctrl-Alt-H          Call hierarchy (hierarchy)
    Ctrl-Q              Quick documentation
    Ctrl-Alt-I          Auto-indent lines (indent)
    Ctrl-Alt-L          Reformat code (line up)
    Ctrl-Alt-O          Optimize imports (optimize)
    Ctrl-/              Comment with line comment (//)
    Ctrl-Shift-/        Comment with block comment (/*...*/)
    Ctrl-W              Select word or block (word)
    Ctrl-D              Copy line (duplicate line, yyp)
    Ctrl-X              Cut line (dd)
    Ctrl-U              Uppercase/lowercase (upper)
    Ctrl-J              Insert live template
    Ctrl-Alt-J          Surround with live template
    Ctrl-Alt-T          Surround with (template)
    Ctrl-Shift-J        Join lines (join)
    Ctrl-E              Recent files (editions)
    Ctrl-Shift-E        Recently changed files (editions)
    Alt-Shift-C         Recent changes (changes)
    Ctrl-B              Delcaration
    Ctrl-Shift-B        Type declaration
    Ctrl-Alt-B          Implementation(s)
    Ctrl-P              Parameter info (parameter)
    Ctrl-Space          Basic completion
    Ctrl-Shift-Space    Smart completion
    Ctrl-Alt-Space      Completion lookup
    Alt-Enter           Auto-complete
    Alt-Insert          Generate...
    Ctrl-Shift-Up/Down  Move statement up/down
    Alt-Shift-Up/Down   Move line up/down
    Ctrl-Up/Down        Scroll up/down
    Alt-Up/Down         Previous/next method
    F2                  Next highlighted error
    Shift-F2            Previous highlighted error
    Ctrl-F              Find
    Ctrl-R              Replace
    F3                  Next match
    Shift-F3            Previous match
    F4                  Jump to source
    Ctrl-Alt-Shift-T    Refactor this
    F5                  Refactor copy
    F6                  Refactor move
    Ctrl-F6             Refactor change signature
    Shift-F6            Refactor rename
    Alt-Delete          Refactor safe delete
    Ctrl-Alt-V          Refactor extract variable
    Ctrl-Alt-F          Refactor extract field
    Ctrl-Alt-P          Refactor extract parameter
    Ctrl-Alt-M          Refactor extract method
    Ctrl-Alt-N          Refactor inline
    

    posted @ 2014-03-09 13:38 laogao 閱讀(12887) | 評論 (0)編輯 收藏

    不久前入了個(gè) Raspberry Pi 也就是大家說的樹梅派(以下簡稱RPi),拿來做藍(lán)牙測試,用的藍(lán)牙dongle是ORICO的BTA-403-BL http://item.jd.com/980800.html 。這里簡單記錄下安裝過程:

    首先是操作系統(tǒng)。作為Arch重度用戶,當(dāng)然選Archlinux ARM了: http://archlinuxarm.org/platforms/armv6/raspberry-pi 下載img文件,用dd寫到SD卡上:
    dd bs=1M if=/path/to/archlinux-hf-*.img of=/dev/sdX

    然后用GParted把SD卡上的分區(qū)拖滿,充分利用空間。這樣SD卡就準(zhǔn)備好了,插到RPi上,接上Micro-USB的電源和網(wǎng)線,啟動(dòng)RPi,從路由器上找到RPi的IP地址(機(jī)器名默認(rèn)是alarmpi),ssh上去(用戶名root密碼root),修改密碼,創(chuàng)建非root賬號(hào),執(zhí)行系統(tǒng)更新 sudo pacman -Syu ,這之后開始安裝藍(lán)牙相關(guān)工具:
    sudo pacman -S bluez bluez-utils

    確保藍(lán)牙dongle插到RPi的USB接口,通過 hciconfig 確認(rèn)藍(lán)牙設(shè)備被識(shí)別,輸出應(yīng)該類似下面這個(gè)樣子:
    [sean@alarmpi]$ hciconfig
    hci0:   Type: BR/EDR  Bus: USB
            BD Address: 84:A6:C8:DC:04:97  ACL MTU: 310:10  SCO MTU: 64:8
            DOWN 
            RX bytes:553 acl:0 sco:0 events:28 errors:0
            TX bytes:384 acl:0 sco:0 commands:27 errors:0

    啟動(dòng)bluetooth:
    sudo systemctl start bluetooth

    完成以后,即可通過 bluetoothctl 命令打開藍(lán)牙控制臺(tái),執(zhí)行各項(xiàng)藍(lán)牙相關(guān)操作,比如show、list、scan on、agent、info等等,這里不展開了。

    如果想使用圖形界面操作RPi,也很簡單,基本步驟如下:
    sudo pacman -S xorg xorg-xinit lxde
    echo 'exec startlxde' > ~/.xinitrc
    startx

    Enjoy!

    posted @ 2014-01-01 13:11 laogao 閱讀(3475) | 評論 (1)編輯 收藏

    第11頁(練習(xí)):
    在Scala REPL中鍵入3,然后按Tab鍵 應(yīng)為 在Scala REPL中鍵入3.,然后按Tab鍵

    第19頁(正文):
    util方法返回一個(gè)并不包含上限的區(qū)間 應(yīng)為 until方法返回一個(gè)并不包含上限的區(qū)間

    第19頁(代碼):
    0 util s.length 應(yīng)為 0 until s.length

    第31頁(正文):
    util是RichInt類的方法 應(yīng)為 until是RichInt類的方法

    第34頁(代碼):
    ArraryBuffer 應(yīng)為 ArrayBuffer
    b.sorted(_ < _) 應(yīng)為 b.sorted
    b.sorted(_ > _) 應(yīng)為 b.sortWith(_ > _) 

    第44頁(代碼):
    scala.collections.immutable.SortedMap 應(yīng)為 scala.collection.immutable.SortedMap

    第53頁(正文):
    Scala對每個(gè)字端都提供getter和setter方法 應(yīng)為 Scala對每個(gè)字段都提供getter和setter方法

    第107頁(代碼):
    val tokens = source.mkString.split("\\S+") 應(yīng)為 val tokens = source.mkString.split("\\s+")

    第341頁(代碼):
    var count: (Int => Double) => null 應(yīng)為 var count: (Int => Double) = null

    // 本文僅作為信息發(fā)布窗口,如需討論交流,請通過郵件 gaoyuxiang.scala@gmail.com 或 QQ群 132569382 。

    posted @ 2012-11-15 15:56 laogao| 編輯 收藏

    主站蜘蛛池模板: 99久久99这里只有免费费精品 | 亚洲成_人网站图片| 国产精品久免费的黄网站| 一个人看的免费观看日本视频www 一个人看的免费视频www在线高清动漫 | 999久久久免费精品国产| 亚洲国产成人无码AV在线影院| 亚洲成aⅴ人片久青草影院| 免费视频一区二区| 一区二区亚洲精品精华液| 亚洲国产综合人成综合网站| 三年片在线观看免费观看大全一 | 91精品视频在线免费观看| 久久精品国产亚洲AV天海翼| 国产成人精品日本亚洲| 特级淫片国产免费高清视频| 怡红院免费全部视频在线视频| 亚洲中文字幕无码一去台湾| 国产性爱在线观看亚洲黄色一级片| 亚洲网站免费观看| 国产va免费精品| 亚洲色大成网站www尤物| 亚洲国产精品久久久久| 男人的天堂亚洲一区二区三区 | 亚洲精品国产精品乱码不99| 日本免费人成视频播放| 最近免费mv在线电影| 一个人看的www视频免费在线观看| 亚洲一区免费在线观看| 亚洲Av永久无码精品三区在线| 国产成人免费a在线资源| h视频在线免费看| a级男女仿爱免费视频| 免费人妻精品一区二区三区| 亚洲三级视频在线观看| 亚洲国产精品高清久久久| 亚洲国产一区明星换脸| 成人免费淫片在线费观看| 在线人成精品免费视频| a级毛片高清免费视频就| 色多多A级毛片免费看| 亚洲成a∧人片在线观看无码|