Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Install visual studio code extensions
#
while IFS= read -r line
do
code --install-extension $line
done < $(dirname $0)/vscode.extensions

vue-router

  • yarn add vue-router@next
  • yarn add -D @vue/cli-plugin-router
  • mkdir src/{router, views}

src/views/index.ts

import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
@koko-u
koko-u / exclude-beta-rule.xml
Last active May 26, 2016 22:19
exclude beta version from versions-maven-plugin
<?xml version="1.0" encoding="utf-8"?>
<ruleset comparisonMethod="maven"
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0
http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
<ignoreVersions>
<ignoreVersion type="regex">.*\.Beta\d*</ignoreVersion>
<ignoreVersion type="regex">.*-beta\d*</ignoreVersion>
<ignoreVersion type="regex">.*-b\d+</ignoreVersion>
@koko-u
koko-u / 0_reuse_code.js
Created July 21, 2014 13:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@koko-u
koko-u / demangle.cpp
Last active June 15, 2023 13:25
demangle typeid name
#include <cxxabi.h>
#include <typeinfo>
#include <memory>
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
struct FreeDeleter {
void operator()(char* ptr) {
@koko-u
koko-u / rails_template.txt
Last active December 19, 2015 06:09
rails application template with RSpec and Guard
gem "i18n_generators"
gem_group :development, :test do
gem "factory_girl_rails"
gem "rspec-rails"
gem "capybara"
gem "capybara-webkit"
gem "launchy"
gem "guard-rspec"
gem "guard-livereload"
@koko-u
koko-u / BookmarkUtil.hs
Created February 13, 2013 11:59
toJSONしか作ってない
module BookmarkUtil (
Bookmark(..),
toJSON
) where
import Data.List
data Bookmark = Bookmark {
name :: String,
url :: String
@koko-u
koko-u / gread_haskell_no1.hs
Created November 9, 2012 16:02
すごいHaskell読書会の演習
slice :: Int -> Int -> [a] -> [a]
slice i j [] = []
slice i j all@(x:xs)
| i < 0 = slice 0 j all
| i > j = []
| i == 0 = take j all
| i > 0 = slice (i-1) (j-1) xs
fib :: Int -> Int
fib 1 = 1
@koko-u
koko-u / hook_sample.t
Created September 16, 2012 05:28
Use of Hook::LexWrap in Test::More for testBefore alternatives
use warnings;
use strict;
use utf8;
use Test::Most;
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
@koko-u
koko-u / Item.pm
Created August 24, 2012 14:52
Perl entrance 07 no1
package Item;
use strict;
use warnings;
use utf8;
use constant TAX => 1.05;
sub new {
my ($class, $item_string) = @_;