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
(ins)> curl -v https://arch.sorah.jp/aur-sorah/os/aarch64 | |
* Trying 54.192.111.51... | |
* TCP_NODELAY set | |
* Connected to arch.sorah.jp (54.192.111.51) port 443 (#0) | |
* ALPN, offering h2 | |
* ALPN, offering http/1.1 | |
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH | |
* successfully set certificate verify locations: | |
* CAfile: /etc/ssl/cert.pem | |
CApath: none |
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
構成: https://scrapbox.io/mozamimy-public/%E3%81%82%E3%81%9F%E3%82%89%E3%81%97%E3%81%84%EF%BE%8A%EF%BE%9F%EF%BE%96%EF%BE%96%EF%BE%9D%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8A%E3%81%9F%E3%81%84 | |
Hyper-V 上の Arch Linux で論理コア 16 全部割当 && 仮想マシンに割り当てるメモリは動的に設定 | |
[16:24:23]mozamimy@lopunny:optcarrot (master) (-'x'-).oO( | |
(ins)> benchmark-driver benchmark.yml -v -e '/home/mozamimy/.rbenv/shims/ruby --jit' --output=all --repeat-count=16 | |
/home/mozamimy/.rbenv/shims/ruby --jit: ruby 2.6.3p62 (2019-04-16 revision 67580) +JIT [x86_64-linux] | |
Calculating ------------------------------------- | |
Optcarrot Lan_Master.nes 80.57735573446210 fps | |
80.69244084240376 | |
81.42002973117617 |
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 foo = { | |
default: "bar" | |
} |
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
function fts() { | |
find . -name "$1" -print | xargs grep "$2" | |
} |
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
require "resolv" | |
class Model < ActiveRecord::Base | |
validates :ip_address, format: { with: Resolv::IPv4::Regex } | |
validates :mac_address, format: { with: /\A([0-9A-F]{2}[-:]){5}([0-9A-F]{2})\z/ } | |
end |
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
str = "Alice" # => "Alice" |
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
" | |
" Show the interface of Evernote Clearly | |
" | |
javascript <<EOM | |
window.onload = function() { | |
require("chrome://readable-by-evernote/content/global.js"); | |
} | |
EOM | |
nnoremap e :js __readable_by_evernote.context_menu__call();<CR> |
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
require "ariete" | |
require_relative "klass" | |
RSpec.describe Klass do | |
include Ariete | |
# You can use without 'Ariete.' if you include Ariete. | |
describe ".output_out" do | |
subject { capture_stdout { Klass.output_out } } | |
it { expect(subject).to eq "Ariete is a kind of rabbit.\n" } |
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 Klass | |
class << self | |
def output_out | |
puts "Ariete is a kind of rabbit." | |
end | |
def output_err | |
warn "Ariete means 'Lop' in Italian." | |
end | |
end |
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
require "ariete" | |
require_relative "klass" | |
RSpec.describe Klass do | |
describe ".output_out" do | |
subject { Klass.method(:output_out).to_proc } | |
it { expect(subject).to be_output "Ariete is a kind of rabbit.\n" } | |
end | |
describe ".output_out(with lambda)" do |
NewerOlder