This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # TODO (temporary here, we'll move this into the Github issues once | |
| # redis-trib initial implementation is completed). | |
| # | |
| # - Make sure that if the rehashing fails in the middle redis-trib will try | |
| # to recover. | |
| # - When redis-trib performs a cluster check, if it detects a slot move in | |
| # progress it should prompt the user to continue the move from where it | |
| # stopped. |
This file contains hidden or 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
| var execFile = require("child_process").execFile, | |
| page = require('webpage').create(), | |
| system = require('system'), | |
| workdir = null, | |
| knownUrls = [], | |
| files = [] | |
| ; | |
| function safeExit(exitCode) { | |
| if (workdir) |
This file contains hidden or 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
| + log_format combined2 '$remote_addr - $remote_user [$time_local] ' | |
| + '"$request" $status $body_bytes_sent ' | |
| + '"$http_referer" "$http_user_agent" $ssl_client_verify'; | |
| + access_log /dev/stdout combined2; | |
This file contains hidden or 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
| kbd106.dll を用意する。 | |
| Win8 だとビルドできたが 10 ではできなかったので | |
| http://www.codeproject.com/Articles/439275/Loading-keyboard-layout-KbdLayerDescriptor-in | |
| で C:\Windows\system32\kbd106.dll をロードし、好みの状態になるようにバイナリエディタで書き換える -- | |
| syswow にもあるが、OS は system32 のほうを使っている、ビット長が違うこともあり、中身は異なるので注意。 | |
| win 10 だと 0xD70 あたりからが数字キー | |
| 変換、無変換はキーがテーブルになかったため、 scancode -> VK 変換のテーブル (0xA80-0xC20) をいじって 変換 | |
| (0x79): 0x041C -> OEM8(0xDF), 無変換(0x7b):0x041D -> 7(0x0037) | |
| に読み替え、未使用だった OEM8 をすべて _ にしている |
This file contains hidden or 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
| var arrayMethods = Object.getOwnPropertyNames( Array.prototype ); | |
| arrayMethods.forEach( attachArrayMethodsToNodeList ); | |
| function attachArrayMethodsToNodeList(methodName) | |
| { | |
| if(methodName !== "length") { | |
| NodeList.prototype[methodName] = Array.prototype[methodName]; | |
| } | |
| }; |
This file contains hidden or 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
| # deploy.rb | |
| def retrieve_instances(name_prefix) | |
| require 'aws-sdk' | |
| next_token = nil | |
| dns_list = [] | |
| begin | |
| resp = Aws::EC2::Client.new.describe_instances( | |
| filters: [{name: "tag:private:service", values: ['my-service']}], | |
| next_token: next_token) | |
| resp.reservations.each do |r| |
This file contains hidden or 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
| if Rails.env.development? | |
| class DisableAssetsLogger | |
| def initialize(app) | |
| @app = app | |
| Rails.application.assets.logger = Logger.new('/dev/null') | |
| end | |
| def call(env) | |
| previous_level = Rails.logger.level | |
| Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0 |
This file contains hidden or 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
| git bisect start -- first_bad success success ... | |
| git bisect run test command |
This file contains hidden or 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
| class ClockRadio | |
| on = self.instance_method(:on!) | |
| define_method(:on!) do | |
| on.bind(self).call | |
| @display_time = true | |
| end | |
| def display_time? | |
| @display_time |
This file contains hidden or 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
| au BufWinEnter COMMIT_EDITMSG setlocal tw=75 | |
| au BufWinEnter COMMIT_EDITMSG let w:g1=matchadd('ErrorMsg', '\%1l\%51v.\+', -1) | |
| au BufWinEnter COMMIT_EDITMSG let w:g2=matchadd('ErrorMsg', '\%76v.\+', -1) | |
| au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%80v.\+', -1) | |