Category: Blog

  • capulator

    Capulator

    Status: Complete

    Capulator is a basic capital gains calculator for cryptocurrency traders. Given a CSV-formatted ledger file of cryptocurrency purchases and sales, it performs FIFO cost basis and capital gains calculations. Results are output back to a new CSV-formatted ledger file. Multiple symbols are supported at once.

    Usage

    Usage is documented in the program’s help, which can be viewed with the --help program argument.

    Ledger File Format

    Supported ledger files are basic CSV files. For examples of the expected structure, take a look at the integration test data in the tests package.

    Testing

    Both unit tests and integration tests can be run for Capulator. Unit tests for each consumed package can be run with a simple go test command issued from the root of the project. Integration tests reside in the tests directory and package, and can thus be run with a special go test ./tests command issued from the root of the project.

    Disclaimer

    Capulator was created solely for the author’s own personal use. Use it for real-world calculations at your own risk – it is not gauranteed to produce accurate results.

    Visit original content creator repository https://github.com/lukehollenback/capulator
  • setdApp

    Hyperledger Fabric을 이용한 블록체인 기반 실시간 기업 간 정산 시스템 프로젝트 (Settlement Business Network)

    Build Status CII Best Practices Go Report Card GoDoc Documentation Status

    본 프로젝트는 블록체인 놀이터 교육장에서 제공하는 교육 프로그램인 하이퍼레저 패브릭을 활용한 블록체인 앱(dApp) 개발에서 수행한 개인 프로젝트로 기업 간 거래에서 발생하는 거래 데이터 중 정산 데이터를 블록체인으로 연동하여 처리하는 “블록체인 기반 실시간 기업 간 정산 시스템 기술” 개발을 목표로 한다.

    Hyperledger Fabric Releases

    디렉토리 구성

    “블록체인 기반 실시간 기업 간 정산 시스템 기술” 의 디렉토리는 총 4개로 구성된다.

    • chaincode: 블록체인 비즈니스 네트워크에 배포될 실시간 정산을 위한 체인코드 소스 디렉토리 (javascript로 작성)
    • gateway: 블록체인 비즈니스 네트워크에 배포된 실시간 정산 체인코드와 연동하여 사용자의 요청에 의해 데이터를 전달하는 HTTP 기반 실시간 정산을 위한 API 서버 소스
    • network: 실시간 정산 비즈니스 네트워크를 구성하는 하이퍼레저 기반 실시간 정산 비즈니스 네트워크 구성 소스
    • ui: 사용자 UI

    구동 절차

    export SETDAPPHOME=/home/aaa/setdApp

    1. 블록체인 비즈니스 네트워크 구동
      1. Org1 인증서 생성
      2. Org2 인증서 생성
      3. Channel-Artifacts 생성: 6개의 프로파일을 생성한다.이 중 Org1OrdererGenesis, Org1Channel를 사용한다.
        1. Org1OrdererGenesis
        2. Org1Channel
        3. Org2OrdererGenesis
        4. Org2Channel
        5. Org12OrdererGenesis
        6. Org12Channel
      4. 블록체인 네트워크를 구동
      5. Settlement Business Network 구동 (체인코드 1.0 배포)
      6. Org2 추가 (체인코드 2.0 배포)
        cd ${SETDAPPHOME}/network
        ./start.sh
    1. hosts 파일 수정
        아래 정보를 추가한다. 이유는 인증서를 내려받기 위해서 ca에 접속하는데
        도메인 이름으로 접속하기 때문에 아래와 같이 hosts 파일에 ca 정보를 추가한다.
        sudo vi /etc/hosts
        127.0.0.1 ca.org1.biz1.com
        127.0.0.1 ca.org2.biz2.com
    1. connection profile 수정
        org1_connection.json, org1_connection.yaml, org2_connection.json, org2_connection.yaml 파일 내용 중
        tlsCaCert path 부분을 각자의 디렉토리에 맞게 수정한다.
        
        ...
        "orderers": {
            "orderer.settle.com": {
            "url": "grpcs://localhost:7050",
            "grpcOptions": {
                "ssl-target-name-override": "orderer.settle.com",
                "grpc-max-send-message-length": -1
            },
            "tlsCACerts": {
                "path": "<디렉토리 변경>/network/crypto-config/ordererOrganizations/settle.com/tlsca/tlsca.settle.com-cert.pem"
            }
            }
        },
        "peers": {
            "peer0.org1.biz1.com": {
            "url": "grpcs://localhost:7051",
            "tlsCACerts": {
                "path": "<디렉토리 변경>/network/crypto-config/peerOrganizations/org1.biz1.com/tlsca/tlsca.org1.biz1.com-cert.pem"
            },
            "grpcOptions": {
                "ssl-target-name-override": "peer0.org1.biz1.com"
            }
            },
            "peer1.org1.biz1.com": {
            "url": "grpcs://localhost:8051",
            "tlsCACerts": {
                "path": "<디렉토리 변경>/setdApp/network/crypto-config/peerOrganizations/org1.biz1.com/tlsca/tlsca.org1.biz1.com-cert.pem"
            },
            "grpcOptions": {
                "ssl-target-name-override": "peer1.org1.biz1.com"
            }
            }
        },
        ...
    1. 게이트웨이 구동
        cd ${SETDAPPHOME}/gateway/test/javascript/org1
        npm install
        rm -rf ${SETDAPPHOME}/gateway/wallet/org1
        node enrollAdmin.js
        node registerUser.js
        node createRate.js
        cd ${SETDAPPHOME}/gateway
        yarn
        PORT=3002 ORG=org1 yarn start
    1. UI 구동
        cd ${SETDAPPHOME}/ui
        yarn
        yarn start
    1. 블록체인 비즈니스 네트워크 종료
        cd ${SETDAPPHOME}/network
        ./stop.sh
    
    
    Visit original content creator repository https://github.com/Denny-Jeon/setdApp
  • server-info

    Server-Info

    Motivation

    I searched a very small web application to saw some information over my server (like a Plex-Media Server or a Fileserver or Raspberry Pi’s). All the Web GUI’s I found were to large for my mind, like Webmin or Ajenti.

    Please note: Over this small tool you can’t manage your server, you are only see sensor data or some CPU data of your server.

    The server side has an PHP part with Slim PHP. So the server is with the REST API very expandable and the frontend is flexible.

    The frontend is developed with AngularJS.

    Installation

    You need an Apache Webserver:

    apt-get install apache2
    apt-get install php5
    

    Then clone this repository and install the dependencys:

    npm install
    

    Copy the complete folder into the root of the webserver:

    /var/www (normaly)
    

    Thats it.

    This application is only for internal usage. The application has no authentication or something else, so don’t publish your server into the internet or NAT your IP to the :80 default port of your Apache Webserer. If you have a exist webapplication on the port 80 or 443 deploy server-info on an other subdomain or port!

    API Documentation

    The REST API Documentation is generated with apidoc. You will found the actual version under the folder “doc”.

    Screenshots

    Licenced under MIT licence

    Copyright (c) 2015 secanis.ch

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    About

    webdesign – developed in switzerland @ secanis.ch

    Visit original content creator repository https://github.com/secanis/server-info
  • bedtime-ext

    Bedtime Extension

    screenshot of the browser extension

    What is it?

    Bedtime is an extension remind you/me to get off the internet and to go to sleep. The extension displays a warning on the lower right hand of a website, telling you well, to go to sleep, if you browse the web after your bedtime.

    The browser extension can be installed from Firefox Add-ons: https://addons.mozilla.org/en-US/firefox/addon/bedtime/.

    After installing the browser extension, you can set your bedtime in the using the popup in the browser bar. The options are 9 pm, 10 pm, 11 pm and midnight. If you’d like to set the bedtime later, feel free to fork this repo or open an issue!

    Why is it?

    To remind myself late at night, on the web, to go to bed! And in case anyone else needed that reminder too.

    How is it?

    The browser extension has the same key elements of all browser extensions.

    The manifest.json file gives the browser extenion permission to run on the active tab, for all websites, to store the bedtime from the popup and to set the icon for the browser bar.

    The content_script.js script runs on every page you visit, checking whether the current time is after either the current bedtime and before 6 am. The current bedtime is either the one set from the popup, or the system default (11 pm).

    The popup.js script listens to clicks to the popup and then sends the storedbedtime to the content_script.js file.

    Thanks to:

    All those at Codebar.io and Web Frontend Co-Learning meetups who helped me talking through learning how to make an extension!

    Also thanks to all the folks who wrote the helpful guide at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension.

    Visit original content creator repository https://github.com/eveahe/bedtime-ext
  • Lemon-IoT-LTE-nRF9160

    Lemon IoT LTE Board

    This repository is the official location for support files for the Lemon IoT LTE nRF9160 Board.

    The board is based on a nRF9160 low power SiP with integrated LTE-M/NB-IOT modem and GNSS from Nordic Semiconductor.

    Board Files

    Before you can target the Lemon IoT LTE board in Zephyr (nRF Connect SDK), board files will need to be downloaded from the Zephyr board files folder and placed in the \Nordic<SDK version>\zephyr\boards\arm folder.

    Two targets exist

    • Lemon IoT NRF9160 and
    • Lemon IoT NRF9160 non-secure.

    The board files also contain the device tree. The following GPIO has been allocated on the following pins:

    Other I/O, for example, I2C, SPI & extra UART communication buses can be added by using DeviceTree overlays in your application project. This provides the end user with the most flexibility in allocating I/O. For an example on how to achieve this, please see the I2C Sensor Example or SPI Sensor Example

    The nRF9160 has four instantiated serial communications peripherals. Each can be configured as either I2C (Also known as TWI or Two Wire Interface), SPI or UART. The Lemon LTE module already has allocated the first serial peripheral to UART (&uart0). This requires additional serial peripherals to be allocated with unique instances, for example &i2c1. Using &i2c0 will conflict with the already allocated &uart0.

    Serial Bootloader

    If you don’t have access to an ARM programmer (Segger J-Link, Nordic Development Kit etc), then the most cost-effective method of programming the Lemon IoT LTE module is via the pre-installed serial bootloader. Information on the serial bootloader can be found in the bootloader/ directory.

    Examples

    Both the zephyr OS and Nordic nRF SDK contain a wide variety of examples to base your next product on.

    In addition to these examples, we have some specific examples for the Lemon IoT LTE module in the Examples folder.

    Visit original content creator repository https://github.com/aaron-mohtar-co/Lemon-IoT-LTE-nRF9160
  • Lemon-IoT-LTE-nRF9160

    Lemon IoT LTE Board

    This repository is the official location for support files for the Lemon IoT LTE nRF9160 Board.

    The board is based on a nRF9160 low power SiP with integrated LTE-M/NB-IOT modem and GNSS from Nordic Semiconductor.

    Board Files

    Before you can target the Lemon IoT LTE board in Zephyr (nRF Connect SDK), board files will need to be downloaded from the Zephyr board files folder and placed in the \Nordic<SDK version>\zephyr\boards\arm folder.

    Two targets exist

    • Lemon IoT NRF9160 and
    • Lemon IoT NRF9160 non-secure.

    The board files also contain the device tree. The following GPIO has been allocated on the following pins:

    Other I/O, for example, I2C, SPI & extra UART communication buses can be added by using DeviceTree overlays in your application project. This provides the end user with the most flexibility in allocating I/O. For an example on how to achieve this, please see the I2C Sensor Example or SPI Sensor Example

    The nRF9160 has four instantiated serial communications peripherals. Each can be configured as either I2C (Also known as TWI or Two Wire Interface), SPI or UART. The Lemon LTE module already has allocated the first serial peripheral to UART (&uart0). This requires additional serial peripherals to be allocated with unique instances, for example &i2c1. Using &i2c0 will conflict with the already allocated &uart0.

    Serial Bootloader

    If you don’t have access to an ARM programmer (Segger J-Link, Nordic Development Kit etc), then the most cost-effective method of programming the Lemon IoT LTE module is via the pre-installed serial bootloader. Information on the serial bootloader can be found in the bootloader/ directory.

    Examples

    Both the zephyr OS and Nordic nRF SDK contain a wide variety of examples to base your next product on.

    In addition to these examples, we have some specific examples for the Lemon IoT LTE module in the Examples folder.

    Visit original content creator repository https://github.com/aaron-mohtar-co/Lemon-IoT-LTE-nRF9160
  • hypermedia-api-client

    Hypermedia API Client

    An experimental hypermedia API client designed to fulfil the HATEOAS part of REST.

    Only HTTP(s) is supported in a useful state right now, as it’s by far the most used mechanism for APIs currently, though
    since HTTP is not a requirement for RESTful APIs, the interface presented by this library will aim to be
    protocol agnostic.

    By understanding common content-types and standards where available (and allowing flexible configuration otherwise)
    we are able to provide an expressive syntax to navigating and interacting with APIs.

    Features

    • Iteration over collections, even when paginated
    • Support for following hypermedia links
    • Support for performing actions through hypermedia controls

    Support for various formats and standards

    • JSON HyperSchema
    • Collection+JSON
    • JSON-LD
    • HAL
    • HAL Forms
    • JSON:API
    • OpenAPI / Swagger

    How it works

    To begin interacting with an API, you need an ApiClient. Initialise one with an array of supported protocols. An
    example, using HTTP and Guzzle looks like this:

    use AdamQuaile\HypermediaApiClient\ApiClient;
    use AdamQuaile\HypermediaApiClient\EventDispatcher;
    use AdamQuaile\HypermediaApiClient\Protocols\Http\HttpProtocol;
    
    $apiClient = new ApiClient(
        [
            new HttpProtocol(
                \Http\Adapter\Guzzle6\Client::createWithConfig([
                    'timeout' => 5
                ]),
                new \Http\Message\MessageFactory\GuzzleMessageFactory()
            )
        ],
        new EventDispatcher()
    );

    The built-in HTTP protocol class uses HttPlug for it’s HTTP abstraction, can support many libraries such as cURL and Guzzle.
    You can also provide test adapters for testing your apps or integrations.

    Now that’s set up, you can load a resource:

    $images = $apiClient->loadFromUri('https://api.digitalocean.com/v2/images');

    From here you can interact with the resource, get data from the response, iterate over lists and follow and act upon
    hypermedia links defined in the API.

    Taking advantage of REST

    Just like your web browser navigates the internet by starting with a URL and following links or filling in forms,
    equipped with the knowledge of HTTP, HTML, JavaScript, etc.. that’s what we’re aiming for with our API client.

    You’ll need to teach your client how to understand how the APIs you’re interacting with work. Perhaps it’s using
    JSON:API, maybe it’s using HAL or JSON HyperSchema. This is where extensions come in.

    As the hypermedia client loads a resource and delegates that loading to the protocol, they emit various events through
    the event dispatcher. Extensions listen to these events and provide the ability to parse various content types and understand
    various hypermedia description formats.

    Using REST-ish APIs

    While hypermedia controls are a requirement for REST, and help to decouple an API and its integrations, not all APIs are
    RESTful. Whether they claim to be or not, some simply aren’t. This does not make them inherently bad APIs, but you will
    need to do a bit of extra work in order to use them with this hypermedia based client.

    Visit original content creator repository
    https://github.com/adamquaile/hypermedia-api-client

  • macSKK

    macSKK test

    macSKKはmacOS用のSKK方式の日本語入力システム (インプットメソッド) です。

    macOS用のSKK方式の日本語入力システムにはすでにAquaSKKがありますが、いくつか独自の機能を作りたいと思い新たに開発しています。

    macSKKを使用するには macOS 13.3 (Ventura) 以降が必要です。 Universal Binary (Apple Silicon & Intel Mac) でビルドしていますが、動作確認はApple Silicon環境でのみ行っています。

    特徴

    • 日本語入力システムはパスワードなどの機密情報を処理する可能性があるため安全性が求められるプログラムです。そのためmacSKKはmacOSのSandbox機構を使いネットワーク通信やファイルの読み書きに制限をかけることでセキュリティホールを攻撃されたときの被害を減らすように心掛けます。
    • 不正なコードが含まれるリスクを避けるため、サードパーティによる外部ライブラリは使用していません。
    • すべてをSwiftだけでコーディングしており、イベント処理にCombineを、UI部分にはSwiftUIを使用しています。
    • 単語登録モードや送り仮名入力中などキー入力による状態変化管理が複雑なのでユニットテストを書いてエンバグのリスクを減らす努力をしています。

    実装予定

    しばらくはAquaSKKにはあるけどmacSKKにない機能を実装しつつ、徐々に独自機能を実装していこうと考えています。

    実装予定の独自機能

    • 自動更新確認
      • Network Outgoingが可能なXPCプロセスを作成し、GitHub Releasesから情報を定期的に取得して新しいバージョンが見つかったらNotification Centerに表示する
    • 辞書のJSON形式への対応
    • xterm.jsを利用するアプリケーションでaiueoでひらがなが入力できない問題のワークアラウンド対応 (VSCode Terminal, Hyperなど)
    • iCloudにマイ辞書を保存して他環境と共有できるようにする
    • マイ辞書の暗号化
      • 編集したい場合は生データでのエクスポート & インポートできるようにする

    インストール

    2023年現在、Mac App Storeでは日本語入力システムを配布することができないため、Appleのソフトウェア公証を受けたアプリケーションバイナリをGitHub Releasesで配布しています。dmgファイルをダウンロードしマウントした中にあるpkgファイルからインストールしてください。

    もしHomebrew Caskでインストールしたい場合は、 brew install --cask macskk でインストールできます。詳しくは https://formulae.brew.sh/cask/macskk を参照してください。

    また独自Cask定義 brew install --cask mtgto/macskk/macskk でもインストールできます。Homebrew公式との違いとしてはこちらはGitHub Actionsで作業を自動化しているのでリリース直後にすぐ反映されます。詳しくは https://github.com/mtgto/homebrew-macSKK を参照してください。

    macSKKのインストール後に、システム設定→キーボード→入力ソースから「ひらがな」(アイコンは▼あ)と「ABC」(アイコンは▼A)を追加してください。カタカナ、全角英数、半角カナは追加しても追加しなくても問題ありません。 もしインストール直後に表示されなかったり、バージョンアップしても反映されない場合はログアウト & ログインを試してみてください。

    SKK辞書は ~/Library/Containers/net.mtgto.inputmethod.macSKK/Data/Documents/Dictionaries に配置してください。まずは https://github.com/skk-dev/dictSKK-JISYO.L から使ってみるとよいでしょう。 その後、macOSメニューバーの入力メニュー→環境設定を開き、辞書設定で使用する辞書を有効に切り替えてください。EUC-JPでないエンコーディングの場合はiボタンからエンコーディングを切り替えてください。現在はEUC-JP (EUC-JIS-2004を含む) とUTF-8に対応しています。辞書ファイルの形式はYAML形式、JSON形式なども提案されていますが現在はJSON形式のみ対応しておりYAML形式には未対応です。

    辞書の削除は上記フォルダから辞書ファイルをゴミ箱に移動するかファイルを削除してください。macSKKが自動で無効化します。

    ユーザー辞書は ~/Library/Containers/net.mtgto.inputmethod.macSKK/Data/Documents/Dictionaries/skk-jisyo.utf8 にUTF-8形式で保存されます。 ユーザー辞書はテキストエディタで更新可能です。別プロセスでユーザー辞書が更新された場合はmacSKKが自動で再読み込みを行います。

    設定

    macSKKが入力メソッドとして選択されているときに入力メニューから「設定…」でGUIの設定画面を開くことができます。またプライベートモードのように入力メニューから直接有効・無効を切り替えるものがあります。

    設定は Plist 形式で ~/Library/Containers/net.mtgto.inputmethod.macSKK/Data/Library/Preferences/net.mtgto.inputmethod.macSKK.plist に保存されます。

    キー 値の型 設定の意味
    dictionaries Array 辞書設定
    directModeBundleIdentifiers Array 直接入力モードにしているアプリケーションのBundle Identifierの配列
    selectedInputSource String キー配列 (KeyLayout) のID
    showAnnotation Boolean 注釈を変換候補のそばに表示するか
    inlineCandidateCount Number インラインで表示する変換候補の数
    workarounds Array 互換性設定がされているアプリケーション
    candidatesFontSize Number 変換候補のフォントサイズ (デフォルト13)
    annotationFontSize Number 注釈のフォントサイズ (デフォルト13)
    skkserv Dictionary skkservサーバーへの接続設定
    selectCandidateKeys String 変換候補から確定するキー配列
    findCompletionFromAllDicts Boolean ユーザー辞書だけでなくすべての辞書から補完を探すか
    showCompletion Boolean 補完候補を表示するか
    selectedKeyBindingSetId String 選択しているキーバインドのセットのID
    keyBindingSets Array キーバインドのセットの配列
    enterNewLine Boolean Enterキーで変換候補の確定 + 改行も行う
    systemDict String 注釈に使用するシステム辞書
    selectingBackspace Number 変換候補選択時のバックスペースの挙動
    punctuation Number カンマとピリオド押下時の句読点設定
    privateMode Boolean プライベートモード
    ignoreUserDictInPrivateMode Boolean プライベートモードでユーザー辞書を無視するか
    showInputModePanel Boolean 入力モードをモーダル表示するか
    candidateListDirection Number 変換候補リストの表示方向
    dateConversions Dictionary 日付変換の読みと変換候補

    機能

    単語登録

    有効な辞書で有効な読みが見つからない場合、単語登録モードに移行します。

    例として “あああ” で変換しようとしても辞書になかった場合 [登録:あああ] のようなテキストが表示されます。

    この状態でテキストを入力しEnterすることでユーザー辞書にその読みで登録されます。漢字変換も可能ですが単語登録モードで変換候補がない変換が行われた場合は入力されなかったと扱い、入れ子で単語登録モードには入れなくなっています。

    単語登録モードでのみ C-y でクリップボードからペーストできます (AquaSKKと同様です)。通常のペーストコマンド Cmd-v はアクティブなアプリケーションに取られて利用できないため、特殊なキーバインドにしています。

    単語登録をしない場合はEscキーや C-g でキャンセルしてください。

    ユーザー辞書から単語の削除

    変換候補が選択されている状態で Shift-x を入力すると (よみ) /(変換結果)/ を削除します(yes/no) という表示に切り替わります。この状態でyesと入力してenterするとユーザー辞書から選択していた変換候補を削除します。noを選んだり Escキーや C-g でキャンセルした場合には何も行いません。

    現状は選択されている変換候補がユーザー辞書にない場合は 削除します(yes/no) という表示を行いますが、実際には何も行いません(ユーザー辞書以外を書き換えたくないため)。将来は他辞書からの削除ができるような対応をするかもしれませんが現在は未定です。

    読みの補完

    入力中、ユーザー辞書にある送りなし変換エントリから先頭が一致する変換履歴がある場合、入力テキストの下部に候補を表示します。タブキーを押すことで表示されているところまで入力が補完されます。

    現在、補完の対象となるのはユーザー辞書の送りなしエントリだけです。

    数値変換

    辞書に “だい# /第#0/第#1/” のように、読みに”#”、変換候補に “#(数字)” を含むエントリは数値変換エントリです。

    macSKKではタイプ0, 1, 2, 3, 8, 9に対応しています。 数値として使えるのは0以上2^63-1 (Int64.max) までです。

    ユーザー辞書に追加される変換結果は “だい# /第#0/” のように実際の入力に使用した数値は含まない形式で追加されます。

    キー配列の変更

    デフォルトではQWERTY配列になっていますが、設定画面からキー配列を変更できます。

    システムで有効なキー配列のうち、英語用のキー配列のみを選択リストに表示しています。

    キーバインドの変更

    qやlやCtrl-jなど、SKKで使用されるキーバインドを変更できます。 変更するには、設定画面のキーバインドからデフォルトのキーバインドのセットを複製してから修正してください。

    もしおかしな挙動だったり、設定にはないような特殊なキーバインドを希望したい場合はIssueでお知らせください。

    ローマ字変換ルールの変更

    どのキーを入力したときにどのような文字に変換するかをカスタマイズすることができます。 例えばローマ字入力表のカスタマイズもできますが、それ以外でも句読点としてカンマやピリオドを入力するように設定したり、全角で入力したい記号を設定することができます。

    ~/Library/Containers/net.mtgto.inputmethod.macSKK/Data/Documents/Settings/kana-rule.conf にファイルを置くことで、ローマ字テーブルの変更や記号入力をカスタマイズすることができます。

    上記のパスにファイルがない場合、もしくは正常に読み込めなかった場合は ~/Library/Input Methods/macSKK.app/Contents/Resources/kana-rule.conf がデフォルトで使用されます。 カスタマイズしたい際はmacSKK.app内にある kana-rule.conf ファイルもしくは https://github.com/mtgto/macSKK/blob/main/macSKK/kana-rule.conf を元にカスタマイズするのがよいでしょう。 設定ファイルの変更を監視しているため更新されたら即座に反映されます。

    ローマ字変換ルール設定ファイルはUTF-8 + LF (BOMなし) で作成してください。 簡単な使い方はデフォルトファイルにもあるので参照してみてください。

    ファイルを配置したのに反映されない場合はConsole.appでエラーが出てないか確認してみてください。 ローマ字変換定義ファイルの XX 行目の記述が壊れているため読み込みできません のようなログが出ているかもしれません。 正常に読み込めている場合は 独自のローマ字かな変換ルールを適用しました というログが出力されます。

    現在制限として、カタカナや半角カナモードでの文字をひらがなモードでの文字と異なる文字を使用する場合、未確定入力中はカタカナでも半角カナでもひらがなのルールが使用されてします。

    例えば a,あ,か,サ という設定がある状態で a を入力した場合はこうなります。

    モード 頭に▽がある 結果 問題ある?
    ひらがな YES ▽あ なし
    ひらがな NO なし
    カタカナ YES ▽ア あり
    カタカナ NO なし
    半角カナ YES ▽ア あり
    半角カナ NO なし

    プライベートモード

    プライベートモードが有効なときは変換結果がユーザー辞書に反映されません。ユーザー辞書以外の辞書やプライベートモードを有効にする前のユーザー辞書の変換候補は参照されます。

    プライベートモードの有効・無効は入力メニュー→プライベートモードから切り替えできます。

    直接入力

    直接入力を有効にしたアプリケーションでは、日本語変換処理を行いません。独自でIME機能を持つEmacs.appなどで使用することを想定しています。

    直接入力の有効・無効の切り替えは、切り替えたいアプリケーションが最前面のときに入力メニュー→”(アプリ名)で直接入力”から行えます。 また有効になっているアプリケーションのリストは設定→直接入力から確認できます。

    直接入力を有効にしたアプリケーションはBundle Identifier単位で記録しているため、アプリケーションを移動させても設定は無効になりません。また特殊なGUIアプリケーションはBundle Identifierをもたないため直接入力を設定できません (Android StudioのAndroidエミュレータとか)。

    ユーザー辞書の自動保存

    ユーザー辞書が更新された場合、一定期間おきにファイル書き出しが行われます。またシステム再起動時やバージョンアップのインストール実行後などmacSKKプロセスが正常終了する際にファイル書き出しが終わっていない更新がある場合はファイル書き出しを行ってから終了します。 もし即座にファイル書き出ししたい場合は入力メニューから”ユーザー辞書を今すぐ保存”を選んでください。

    Command + Option + Escからの強制終了時やシグナルを送っての終了時は保存されないので注意してください。

    バージョンの自動チェック

    macSKKは現在開発中のアプリケーションです。そのため安定していない可能性が高いです。 なるべく不具合が修正された最新バージョンを使っていただきたいため、定期的に新しいバージョンがないかをチェックして見つかった場合は通知センターで通知します。

    新規バージョンの確認はGitHubのReleasesページのAtom情報を取得して行います。 バージョンチェックは12時間おきにバックグラウンドで実行されます。

    macSKKアプリ自体はApp Sandboxでインターネット通信ができないように設定しているため、GitHubのReleaseページの取得はmacSKKからXPCを介して外部プロセスで行います。

    SKKServを辞書として使う

    skkservサーバーをSKK辞書として使用することができます (macSKKがskkservサーバーとして機能するわけではないです)。 まだ作り込みが甘いのでベータ機能だと思ってください。

    設定の辞書メニューからSKKServを有効にすることで使用できます。

    • アドレスはIPv4, IPv6, ホスト名のいずれかを指定してください。
    • ポート番号は通常は1178が使われるようです
    • 応答エンコーディングは通常はEUC-JPが使われることが多いようですがskkservの実装によってはUTF-8を返すものもあるようです。
    • SKKServ設定画面のテストボタンは設定中のskkservにバージョン取得コマンドを試します。正常な応答があれば「skkservへの接続に成功しました」と表示されます。

    現状は以下の制限があります。

    • 同時に1サーバーまで接続可能です。
    • TCP接続が切断されたり1秒以内に送信できなかったり1秒以内に応答がなかった場合は取得できなかったものとして扱います。
    • 常にファイル辞書よりも変換候補は後に出るようにしています。
      • 並び替えのUIで迷ったために先送り。将来並び替えできるようにすると思います。

    動作確認はyaskkserv2でのみ行っています。

    アンインストール

    現在アンインストールする手順は用意していないためお手数ですが手動でお願いします。 今後、dmg内にアンインストーラを同梱予定です。

    手動で行うには、システム設定→キーボード→入力ソースから「ひらがな」「ABC」を削除後、以下のファイルを削除してください。

    • /Library/Input Methods/macSKK.app
    • ~/Library/Containers/net.mtgto.inputmethod.macSKK

    FAQ

    Q. Visual Studio Code (vscode) で C-j を押すと行末が削除されてしまいます

    A. C-j がVisual Studio Codeのキーボードショートカット設定の editor.action.joinLines にデフォルトでは割り当てられていると思われます。Cmd-K Cmd-S から editor.action.joinLines で検索し、キーバインドを削除するなり変更するなりしてみてください。

    Q. Wezterm で C-j を押すと改行されてしまいます

    A. macos_forward_to_ime_modifier_maskCTRL を追加することでIMEに C-j が渡されてひらがなモードに切り替えできるようになります。 SHIFT も入れておかないと漢字変換開始できなくなるので、 SHIFT|CTRL を設定するのがよいと思います。

    Q. 標準Terminal / iTerm2で C-j を押すと改行されてしまいます

    A. Karabiner-Elementsで C-j をかなキーに置換することで対応することができます。作者は以下のようなComplex Modificationsを ~/.config/karabiner/assets/complex_modifications/macskk.json に配置しています。将来 https://github.com/pqrs-org/KE-complex_modifications に配置して簡単にインストールできるようにしようと思っています。

    {
        "description": "macSKK for Terminal/iTerm2",
        "manipulators": [
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^com\\.googlecode\\.iterm2",
                            "^com\\.apple\\.Terminal"
                        ],
                        "type": "frontmost_application_if"
                    },
                    {
                        "input_sources": [
                            {
                                "input_source_id": "^net\\.mtgto\\.inputmethod\\.macSKK\\.(ascii|hiragana|katakana|hankaku|eisu)$"
                            }
                        ],
                        "type": "input_source_if"
                    }
                ],
                "from": {
                    "key_code": "j",
                    "modifiers": {
                        "mandatory": [
                            "left_control"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "japanese_kana"
                    }
                ],
                "type": "basic"
            }
        ]
    }

    Q. Ghosttyでq/lキーでモードを切り替えてもq/lが入力されてしまう / C-j を押すと改行されてしまう

    Ghostty v1.1.0で、q/lなどで入力モードが変更されたかどうかをGhostty側で判定してくれるようになりました。ただしOS側の現在の入力モードが変わったかどうかをチェックしているため、切り替え前と切り替え後の入力モードを両方ともmacOSのキーボード設定で有効にしておく必要があります。 例えばmacSKKの「ひらがな」だけを入れている場合、qでカタカナモードに変更してもOSでの入力モードは「macSKKのひらがな」のままと認識されてしまいqがそのまま入力されてしまいます。同様にmacSKKの「ABC」を入れていないと、lを入力してもモードが変わってないとGhosttyには解釈されてlがそのまま入力されてしまいます。 https://zenn.dev/mtgto/articles/macskk-karabiner-settings-for-ghostty も参考にしてください。

    Q. Visual Studio Code (vscode) のターミナルやClaude Code拡張でaiueoがひらがなにならない・qlのモード変更でキーが入力されてしまう

    xterm.js利用の問題と思われます。 #356

    入力メニューにある「1文字目を未確定扱い (互換性)」を有効にすることで aiueo のようなローマ字1文字からなるひらがなの入力ができるようになります。あくまで一時的な回避策 (ワークアラウンド) なので、aiueo のあとは他の文字を打つかEnterが押されないと入力が確定されないままとなります。

    Q. アプリによってq/lキーでモードを切り替えてもq/lが入力されてしまう / C-jで改行されてしまう

    #119 と同じ問題と思われます。 v0.20.0ではKitty, LINE, Alacrittyについて「空文字挿入」というワークアラウンドを初期設定でもっています。

    空文字挿入の設定は、アプリが最前面にあるときに入力メニューから設定可能です。 またmacSKKの設定内の「互換性の設定」からも可能です。

    Q. OS標準の入力ソース ( 日本語ABC ) を削除してmacSKKだけにしたい

    日本語 の設定で入力モードの英字を有効にしてから ABC, 日本語 の順に削除するとmacSKKだけにしたりできるようです。 参考: https://zenn.dev/yoshiyoshifujii/articles/78798db6472bf4

    Q. ターミナルで キーボード入力のセキュリティを保護 iTerm2で Secure Keyboard Entry を有効にすると入力メニューで無効化される

    macOSの日本語入力システムは、ユーザーライブラリ (~/Library) とシステムライブラリ (/Library) の二種類の配置場所があるのですが、 Secure Keyboard Entry が有効なアプリケーション内で日本語入力システムを使用できるようにするにはシステムライブラリにインストールされている必要があるようです。

    参考: #351

    v2.0.0からシステムライブラリへのインストールが可能にできるように変更しました。システムライブラリへのインストールをお試しください。

    開発

    コントリビュートのガイドを .github/CONTRIBUTING.md に用意しています。

    Xcodeでビルドし、 ~/Library/Input MethodsmacSKK.app を配置してからシステム設定→キーボード→入力ソースで ひらがな (macSKK) などを追加してください。

    macOS 14以降ではApp Sandboxの制限が強くなりました。すでにリリース版macSKKを使っている環境で開発版のmacSKKを使用すると起動時に 「"macSKK"がほかのアプリからのデータへのアクセスを求めています。」 というダイアログが表示されることがあります。これはリリース版で署名に使用しているTeam IDと異なるProvisioning Profileを使用している (もしくはAd hoc署名を使っている) 場合に同じユーザー辞書ファイルにアクセスすることで発生します。この状態で「許可」を選んでしまうとリリース版のmacSKKが逆に読み込めなくなるなどの想定しない問題が発生する可能性があります。お手数ですがBundle Identifierを変更するなどを検討してください。

    バージョンアップ

    X.Y.Z 形式のバージョン (MARKETING_VERSION) とビルド番号 (CURRENT_PROJECT_VERSION) の更新が必要です。

    ビルド番号

    メジャー、マイナー、パッチ、どのバージョンアップでも1ずつインクリメントしてください。 Xcodeから手動でやってもいいし、agvtoolでもいいです。

    agvtool next-version

    MARKETING_VERSIONの更新

    Info.plistCFBundleShortVersionStringで管理するのではなくpbxprojにMARKETING_VERSIONで管理する形式だとagvtool next-marketing-version が使えないみたいなのでXcodeで手動で変えてください。

    リリース

    • CHANGELOGを記述
    • バージョンアップ
    • make clean && make release
    • GitHubのReleaseを作成、dmgとdSYMsをアップロード、CHANGELOGをコピペ

    ライセンス

    macSKKはGNU一般公衆ライセンスv3またはそれ以降のバージョンの条項の元で配布されるフリー・ソフトウェアです。

    詳細は LICENSE を参照してください。

    Visit original content creator repository https://github.com/mtgto/macSKK
  • DASK-AWS-Kubernetes

    DASK-AWS-Kubernetes

    A “One-Click solution” to deploy a scalable and secure Kubernes + DASK cluster in one step on AWS in 10 minutes.

    The solution has many advanced and configurable options via AWS CloudFormation, only requires minimal knowledge of AWS and Kubernetes. It is ideal if you need a secure, private DASK cluster to process your own data.

    It is hihly recommended to use an S3 bucket and mount it to persist your notebook files. (see below)

    The Jupyter notebook data persisted to private, mounted S3 buckets.

    NOTE: DASK is a scalable, distributed Python based data analytics / data science tool.

    Main features

    • One-click, automated Kubernetes + DASK deployment
    • Kubernetes cluster node and pod auto-scaling, 100% Kubernetes compatibility using KOPS
    • Automated OpenVPN setup, immediate private access to JupyterLab (notebooks) and DASK scheduler via VPN
    • SPOT EC2 worker node usage possibility to cut costs
    • S3 bucket mount on all nodes to persist notebooks and access S3 data easily
    • Custom Jupyter password setup
    • Install custom PIP and Conda packages (list) during bootstrap
    • Ability to us customized DASK Docker images
    • Notify via SNS when cluster is deployed and ready to use
    • One-click deployment tear-down
    • AWS region independent dynamic AMI image selection

    NOTE: I always keep focus on security and flexibility, so the deployed cluster is running in private AWS VPC and accessible only via OpenVPN. The VPN setup is automated so only a client application needed to sue it. I do not change the original Docker images. All deployment running on separately created AWS VPC.

    Architecture and details

    AWS architecture

    The deployment architecture consist of two parts, the first is the Kubernetes running on AWS and the DASK deployment on the Kubernetes cluster.

    N|Solid

    One-Click solution – AWS Quick-Start

    One-click setup on AWS via CloudFormation:

    Quck-Start Deploy to AWS-EU Ireland region

    Quick-Start Deploy to AWS-US North Virginia region

    Template

    View / copy and paste the template to your AWS CloudFormation / create – stack page: https://s3-eu-west-1.amazonaws.com/tatobi-dask-aws-deploy/latest/cfn-templates/dask-aws-deploy-template.yaml

    CloudFormation parameters

    NOTE: There are default CFN parameters, you do not need to change them to deploy your cluster. The above documentation helps you customize the deployment according your needs.

    AWS and Kubernetes Configuration

    • Creates a new VPC with defined CIDR block: the newly created VPC Ipv4 CIDR

    • Bastion Allowed Access – IPv4 CIDR: from where the bastion host accessible, 0.0.0.0/0 means public.

    AWS EC2 / Kubernetes Configuration

    • Existing EC2 keypair name for instances: previously created Ec2 keypair name (access the cluster via SSH, EC2 KeyPair) !REQUIRED!

    • Bastion instance type: the bastion host AWS EC2 instance type (EC2 types and prices)

    • K8s Master Instances Type: Kubernetes cluster MASTER node EC2 instance type (EC2 types and prices)

    • K8s Nodes Instances Type: Kubernetes cluster NODES EC2 instance type (EC2 types and prices)

    • K8s Nodes SPOT MAX Bid price /h: Kubernetes nodes maximum SPOT price. If you leave 0, empty or negative, on-demand instances deployed. (EC2 SPOT types and prices)

    • K8s AutoScaling MINIMUM Node Number: The minimum number of deployed as Kubernetes NODES. 3 is required as the minimum.

    • K8s AutoScaling MAXIMUM Node Number: The maximum number of deployed as Kubernetes NODES. The maximum used by the cluster-autoscaling. The cluster-autoscaler plugin is deployed by default.

    • K8s AutoScaling MINIMUM Node Number: The minimum number of deployed as Kubernetes NODES. 3 is required as the minimum.

    • K8s Instances Disk Size: The AWS EBS volume attached to Kubernetes cluster members as a root volume (GB).

    • S3 bucket NAME for CFN Bootstrap Files: The S3 bucket name, where the Kubernetes cluster bootstrap files and DASK bootstrap files are located. The default used tatobi-dask-aws-deploy is public read-only, you can fork the whole solution, modify the files and replace this bucket with your one.

    • S3 key prefix for CFN Bootstrap Files: The above bootstrap bucket “subfolder” (or S3 key) where the boostrap files are located.

    • DASK mounted S3 bucket name to work subfolder: If NOT empty, this S3 bucket will be mounted to: /home/jovyan/work You can store the processed data, the results and Jupyter notebooks here.

    • KOPS relese number: Which KOPS version is used to deploy the cluster. Keep default 1.10.0

    • kubectl release number: Which Kubectl version is used to deploy the cluster. Keep default 1.10.7

    • helm release number: Which HELM version is used to deploy the cluster. Keep default 2.10.0

    • Kubernetes and bastion host OS: Ubuntu 16.04LTS is the currently supported OS verion only. The latest 18.04LTS support coming soon (depends on KOPS).

    • Download link for Goofys S3FS binary: The S3FS mount uses Goofys, it is the download URL of binary.

    Advanced DASK Configuration

    • Password for access DASK JupyterLab notebook: The login password for JupyterLab notebook

    • AWS SNS topic ARN for DASK setup finsihed notifications: If you have and already existing AWS SNS notification topic, this ARN can be used to notify you when the deployment is ready.

    • Password for access DASK JupyterLab notebook: The login password for JupyterLab notebook

    • Custom DASK Jupyter Docker image URI: We use the default HELM and DASK Docker images if you leave empty, if not, paste here your own DASK Jupyter Docker image path. It maybe useful if you have many pre-installed pip, conda packages, custom binaries or data placed in your images.

    • Custom DASK Worker Docker image URI: We use the default HELM and DASK Docker images if you leave empty, if not, paste here your own DASK Worker Docker image path.

    • Comma separated list of extra CONDA packages to install: Define here which CONDA packages need to be installed during the deployment.

    • Comma separated list of extra Python PIP packages to install: Define here which Python PIP packages need to be installed during the deployment.

    NOTE: “I acknowledge that AWS CloudFormation might create IAM resources.” should be checked.

    Access DASK

    Because the deployment does not need HTTPS (SSL) connection, but the secure access is essential I’ve chosen OpenVPN to connect your machine or your on-premises to the Kubernetes – DASK cluster running on AWS.

    OpenVPN

    [1]: Download and install OpenVPN on your client Operating System:

    • LINUX: is your OS:

    RedHat / Fedora / CentOS:

    sudo yum install openvpn

    Ubuntu / Debian:

    sudo apt install openvpn

    • WINDOWS: use WINDOWS INSTALLER (NSIS) :

    OpenVPN Download

    • Apple MAC OSX:

    TunnelBlick

    • Android:

    Googl App store / OpenVPN

    [2]: Download OpenVPN connection profile from your AWS CloudFormation stack output

    • Go to the AWS console CloudFormation page

    • Choose your Stack Name checkbox (default: “DASK-AWS-Kubernetes”)

    • Click on Outputs TAB (below)

    • Click on DownloadOpenVPNConfigURL URL and save it openvpn-secrets.zip

    • UNZIP the openvpn-secrets.zip file with your DASJupyterAndUnZIPPassword Output password ans save one of the *.ovpn file to you machine, the example file name is: DASK.OVPN.dask-aws-kubernetes.1.ovpn

    • Connect OpenVPN: WINDOWS: double click file / import OpenVPN profile / connect, on Linux:

    sudo openvpn --config DASK.OVPN.dask-aws-kubernetes.1.ovpn
    
    • Download DASK URL file: on Output tab, choose DownloadDASKAccessURL download and save the dask-connection.zip file, UNZIP it with the same DASJupyterAndUnZIPPassword password, save and open text file: dask-connection.zip

    • open the dask-connection.txt and extract information:

    Open URLs:

    Jupyter Lab URL: http://internal-……..elb.amazonaws.com/

    DASK scheduler URL: http://internal-……..elb.amazonaws.com/

    Login to Jupyter Lab with DASJupyterAndUnZIPPassword Output parameter.

    NOTE: These are AWS internal Loadbalancers, they have internal private IP addresses, so there is no external public acccess, only via OpenVPN.

    [3]: OPTIONAL: if you use S3FS S3 bucket mounts, save your data (from cluster or remotely), notebooks to /home/jovyan/work

    NOTE: Every node has this S3 mount path accessible, not just the JupyterLab!

    Delete stack

    There is a seamless tear-down integration in the deployment. If you don’t need the deployment anymore, go to AWS Console , CloudFormation page, chosse your stack and choose Actions -> Delete stack.

    References

    There are 3 open source projects I created previously, the current solution consists common parts from them:

    #1: kubernetes-aws

    #2: aws-dask-kubernetes

    #3: easy-openvpn

    Visit original content creator repository https://github.com/tatobi/DASK-AWS-Kubernetes
  • ZealotSniperV2

    Zealot Sniper (Version 2)

    Snipes zealots for you with the frozen scythe in hypixel skyblock. Version 1 was based on computer vision and pyautogui, but the mouse controls were fumbly and a pain to implement, leading to it’s discontinuation.

    Consider giving this repository a star!

    Features

    Built-in Fullbright and Togglesprint module (both enabled by default). Default ClickGUI keybind is RSHIFT.

    Zealot Sniper module

    Default keybind is “R”.

    Core Features

    • Aims and shoots at Zealots

    Safety features

    • Admin detector
    • NPC detector
    • Lobby shutdown detector
    • Death detector
    • Detects when player is looking at you for too long
    • Detects if your name appears in chat messages
    • Two movement modes: SneakForward and JumpSneak
    • Randomized time interval for switching between movement modes
    • Two targeting modes: Distance based and Rotation based. Default is rotation, but will switch to distance when Special Zealot spawns.

    Future features

    • End pedestal auto sacrifice
    • Baritone integration to return to orginal farming spot after /warp home
    • Silent and smooth aiming
    • Zealot counter
    • Lobby verification (Check if there’s already a frozen scythe user in the location)
    • Endstone protector killer
    • Auto bazaar sell after full inventory
    • More randomized movement modes
    • etc.

    Installation

    Head to releases and download the jar. The mod is only compatible for 1.12.2 forge. To run it, put it in your mods folder.

    Building from source

    To build from source, clone the repository and run ./gradlew build.

    Development

    To setup a development environment, clone the repository and run ./gradlew setupDecompWorkspace. Then, open the build.gradle file in your IDE (e.g. Intellij) and select Open as Project.

    Credits

    Version 2 now uses the CatClient as its base. It saved me a lot of time, so credit to its authors.

    Contributing

    Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

    Other

    ALL free skyblock clients are RATs. I found that out the hard way because I was an idiot and lost around 2 bill. I’m was really fucking annoyed and decided to make my own. The project probably contains bad code, as it was rushed to completion during exam season.

    If you don’t trust this client, you can check through the source code.

    Visit original content creator repository
    https://github.com/middleclicker/ZealotSniperV2