Skip to content

Instantly share code, notes, and snippets.

🐢
hello world!

MATSUMOTO Katsuyoshi katsyoshi

🐢
hello world!
Block or report user

Report or block katsyoshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AvoidBomInUTF8FromCSV.rb
class BomUtf8CSV
attr_reader :has_bom
UTF_8_BOM = "\xEF\xBB\xBF".b
def initialize(io)
io.rewind if io.respond_to?(:rewind)
@has_bom = io.read(UTF_8_BOM.length) == UTF_8_BOM
io.rewind unless @has_bom
@io = io
@csv = CSV.new(@io, { headers: true })
end
@katsyoshi
katsyoshi / env.md
Created May 28, 2019
fortitude60 LCTRL mapped CapsLock
View env.md
View lsp-ruby-mtsmfm.log
D, [2018-11-27T20:40:28.516834 #15714] DEBUG -- : Receive: {
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"processId": 14486,
"rootPath": "/home/katsyoshi/Program/Ruby/anzen-na-password-kanri/",
"rootUri": "file:///home/katsyoshi/Program/Ruby/anzen-na-password-kanri/",
"capabilities": {
"workspace": {
"applyEdit": true,
@katsyoshi
katsyoshi / build.log
Created Sep 9, 2018
i cannot build cumo in my pc
View build.log
current directory: /home/katsyoshi/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/cumo-0.1.0/ext/cumo
/home/katsyoshi/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20180910-20388-1muakq5.rb extconf.rb
checking for numo/narray.h... yes
checking for dlfcn.h... yes
checking for -ldl... yes
checking for dlopen()... yes
checking for stdbool.h... yes
checking for stdint.h... yes
checking for bool in stdbool.h... yes
checking for u_int8_t in stdint.h... yes
View apache arrow.deb
エラー:6 https://packages.red-data-tools.org/debian bionic/main Sources
404 Not Found [IP: 133.18.24.104 443]
無視:7 https://packages.red-data-tools.org/debian bionic/main all Packages
無視:8 https://packages.red-data-tools.org/debian bionic/main i386 Packages
無視:9 https://packages.red-data-tools.org/debian bionic/main amd64 Packages
無視:10 https://packages.red-data-tools.org/debian bionic/main Translation-ja_JP
無視:11 https://packages.red-data-tools.org/debian bionic/main Translation-ja
無視:12 https://packages.red-data-tools.org/debian bionic/main Translation-en
無視:13 https://packages.red-data-tools.org/debian bionic/main amd64 DEP-11 Metadata
無視:14 https://packages.red-data-tools.org/debian bionic/main all DEP-11 Metadata
View gist:6550221fef7a9044b653b5fa9622b90c
-[321]% iwlist wlp1s0 scanning | grep -e SSID -e Frequency | grep -i rubykaigi -A 1
ESSID:"RubyKaigi 2018"
Frequency:2.412 GHz (Channel 1)
ESSID:"RubyKaigi 2018"
Frequency:2.412 GHz (Channel 1)
ESSID:"RubyKaigi 2018"
Frequency:2.412 GHz (Channel 1)
ESSID:"RubyKaigi 2018"
Frequency:2.412 GHz (Channel 1)
ESSID:"RubyKaigi 2018"
@katsyoshi
katsyoshi / dns dig
Created Apr 23, 2018
cannot find mangamura.org
View dns dig
-[1132]% dig @8.8.8.8 mangamura.org
; <<>> DiG 9.11.2-P1 <<>> @8.8.8.8 mangamura.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39674
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
@katsyoshi
katsyoshi / rdoc.log
Created Mar 4, 2018
failed rdoc building in gentoo emerge
View rdoc.log
-[12122]% sudo emerge -uDN rdoc
* IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 7) dev-ruby/rdoc-6.0.1::gentoo
@katsyoshi
katsyoshi / float_compair.rs
Created Jan 27, 2018
Couldn't compare float number in Rust Lang
View float_compair.rs
fn main() {
let val = vec![1.3, 1.2, 3.0];
val.sort();
for v in val { println!("{}", v); }
}
/*
Compiling sort v0.1.0 (file:///ome/katsu/Prohgram/Rust/zatsu/rust/nlp100/sort)
error[E0277]: the trait bound `{float}: std::cmp::Ord` is not satisfied
--> main.rs:4:10
View gist:980cf95c3533828d2ffa4d4daf670026
-[4671]% curl -X GET \
-H 'Authorization: Token 6f916ae6-8472-463a-9808-6af19e459541' \
-d "haute_couture[query]=WITH comments AS (SELECT comments.id, content, users.name AS user_name, comments.created_at FROM comments JOIN users ON comments.user_id = users.id), likes AS (SELECT COALESCE(users.name, '匿名') AS user_name, likes.created_at, comment_id FROM likes LEFT OUTER JOIN users ON likes.user_id = users.id) SELECT comments.id, content, comments.user_name, JSON_AGG(likes ORDER BY likes.created_at DESC) AS liked_by FROM comments JOIN likes ON likes.comment_id = comments.id GROUP BY 1, 2, 3" \
http://sqlql-demo.herokuapp.com/haute_couture | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2340 0 1833 100 507 1833 507 0:00:01 --:--:-- 0:00:01 3798
[
{
You can’t perform that action at this time.