Skip to content

Instantly share code, notes, and snippets.

View mozamimy's full-sized avatar
🍤
Flying Ebi

Mizuki Asada mozamimy

🍤
Flying Ebi
View GitHub Profile
@mozamimy
mozamimy / xxx
Created December 3, 2019 00:41
403
(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
@mozamimy
mozamimy / Desktop
Last active August 11, 2019 07:32
benchmark
構成: 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
@mozamimy
mozamimy / hash1.js
Last active August 29, 2015 14:23
2015-06-26 blog
var foo = {
default: "bar"
}
@mozamimy
mozamimy / fts.sh
Last active August 29, 2015 14:20
Full Text Search in bash
function fts() {
find . -name "$1" -print | xargs grep "$2"
}
@mozamimy
mozamimy / gist:52c0004c8370f78df2c2
Created May 4, 2015 07:43
Validations for IP address and MAC address on Ruby on Rails
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
@mozamimy
mozamimy / 2014-03-05_01.rb
Last active August 29, 2015 14:14
2014-03-05.rb
str = "Alice" # => "Alice"
@mozamimy
mozamimy / 2014-11-09_01.js
Last active February 26, 2024 10:00
2014-11-09_01.js
"
" 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>
@mozamimy
mozamimy / 2014-11-17_02.rb
Last active August 29, 2015 14:14
2014-11-17_02.rb
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" }
@mozamimy
mozamimy / 2014-11-17_01.rb
Last active August 29, 2015 14:14
2014-11-17_01.rb
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
@mozamimy
mozamimy / 2014-11-24_02.rb
Last active August 29, 2015 14:14
2014-11-24_02.rb
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