Skip to content

Instantly share code, notes, and snippets.

View morishin's full-sized avatar
🦍
ウホホ

Shintaro Morikawa morishin

🦍
ウホホ
View GitHub Profile
@morishin
morishin / v.sh
Last active May 15, 2020 01:34
Open Visual Studio Code command
function v() {
setopt +o nomatch # suppress zsh message
if [ -z $1 ]; then
DIR="."
else
DIR=$1
fi
WORKSPACE=`find $DIR -maxdepth 1 -name *.code-workspace 2>/dev/null`
if [ $? -eq 0 ] && [ -n "$WORKSPACE" ]; then
DIR=$WORKSPACE

listmonster

head

irb(main):005:0> a = [1, 2, 3]
=> [1, 2, 3]
irb(main):007:0> a.first
=> 1
irb(main):008:0> a
package main
import (
"fmt"
"time"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.