Skip to content

Instantly share code, notes, and snippets.

@ryoo14
ryoo14 / fav_web_services.md
Last active March 29, 2021 12:20
my favorite web services
@ryoo14
ryoo14 / w3mopen2
Created September 30, 2014 12:50
w3m.vimをちょっと便利にしたかった
" w3m
function! W3mOpen()
let l:url = matchstr(getline('.'), 'htt[p|ps]:\/\/[^>,;:]*')
execute ':vs'
execute ':W3m' l:url
endfunction
nnoremap <silent> <c-w> :call W3mOpen()<CR>
@ryoo14
ryoo14 / w3mopen
Last active August 29, 2015 14:07
w3m.vimをちょっと便利にしたかった
" w3m
function! W3mOpen()
let l:url = matchlist(getline('.'), '\(htt[p|ps]:\/\/[^>,;:]*\)\s')
execute ':vs'
execute ':W3m' l:url[1]
endfunction
nnoremap <silent> <c-w> :call W3mOpen()<CR>
@ryoo14
ryoo14 / tweet_search.pl
Created June 3, 2014 13:26
twitter search
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Net::Twitter::Lite::WithAPIv1_1;
use Encode;
my $nt = Net::Twitter::Lite::WithAPIv1_1->new(
consumer_key => '',
@ryoo14
ryoo14 / shell_arts2-4.sh
Created March 25, 2014 14:47
シェル芸勉強会第2回 問題4
sort -k1,1 num2 | yarr num=1 | sed 's/[ab] //g' | sed 's/ / + /g' | bc
@ryoo14
ryoo14 / shell_arts2-3.sh
Created March 25, 2014 13:22
シェル芸勉強会第2回 問題3
for i in a b ; do grep $i hoge | sort -k2n | tail -1; done
@ryoo14
ryoo14 / shell_arts2-2.sh
Created March 25, 2014 13:00
シェル芸勉強会第2回 問題2
expr $(cat nums | tr "\n" " " | sed 's/ $//' | sed 's/ / + /g')
@ryoo14
ryoo14 / shell_arts2-1.sh
Created March 25, 2014 12:35
シェル芸勉強会第2回 問題1
ls [!a-zA-z]* | xargs rm
@ryoo14
ryoo14 / shell_arts5.sh
Created March 19, 2014 12:30
シェル芸勉強会-第一回-問題5
seq 1 16 | awk '{if($1%15==0){print "FizzBuzz"}else if($1%3==0){print "Fizz"}else if($1%5==0){print "Buzz"}else{print $1}}' | tr '\n' ','
@ryoo14
ryoo14 / shell_arts4.sh
Last active August 29, 2015 13:57
シェル芸勉強会-第一回-問題4
awk '{print int($1/10)}' ages | sort -n | uniq -c | awk '{print $2*10"〜"$2*10+9,$1}'