Skip to content

Instantly share code, notes, and snippets.

@k2works
k2works / init.vim
Last active February 10, 2023 02:31
My init.vim
" set encoding=utf-8
scriptencoding utf-8
" ↑1行目は読み込み時の文字コードの設定
" ↑2行目はVim Script内でマルチバイトを使う場合の設定
" Vim scritptにvimrcも含まれるので、日本語でコメントを書く場合は先頭にこの設定が必要になる
"----------------------------------------------------------
" NeoBundle
"----------------------------------------------------------
if has('vim_starting')
@k2works
k2works / tdd.rb
Last active April 5, 2020 06:41
Ruby TDD Startter
# Test::Unit
require 'test/unit'
class TestAdd < Test::Unit::TestCase
def setup;end
def test_add
assert_equal 5, add(2,2)
end
end
@k2works
k2works / tdd.html
Last active March 26, 2020 02:29
JavaScript TDD Startter
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
@k2works
k2works / tdd.ps1
Last active February 24, 2021 04:00
PowerShell TDD Startter
function add ([int]$a, [int]$b) {
$sum = $a + $b
$sum
}
Describe "TestAdd" {
It "合計を返す" {
$result = add 2 2
$result | Should Be 4
}
@k2works
k2works / tdd.js
Last active April 1, 2020 03:15
Node TDD Startter
const assert = require("assert");
try {
assert.strictEqual(5, add(2, 2));
console.log("ok");
} catch (err) {
console.log(err);
}
function add(a, b) {
@k2works
k2works / tdd.py
Last active April 14, 2021 01:37
Python TDD Starter
# %%
# Doctest
import doctest
def add(a, b):
"""Return the sum of a and b.
>>> add(2, 2)
4
"""
@k2works
k2works / .vimrc
Last active December 30, 2022 07:38
my_vimrc
set encoding=utf-8
scriptencoding utf-8
" ↑1行目は読み込み時の文字コードの設定
" ↑2行目はVim Script内でマルチバイトを使う場合の設定
" Vim scritptにvimrcも含まれるので、日本語でコメントを書く場合は先頭にこの設定が必要になる
"----------------------------------------------------------
" NeoBundle
"----------------------------------------------------------
if has('vim_starting')
@mitsuruog
mitsuruog / index.md
Last active April 15, 2024 00:54
express実践入門

express実践入門


自己紹介

小川充

  • mitsuruog
@munhitsu
munhitsu / gist:ba11f4728d726e7cf254
Last active September 13, 2015 15:45
SSL issue on OSX 10.10.3 (docker-compose up / docker-py - failing with: SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590))
# docker-py / docker-compose installed through pip fails with
# SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
# At the moment simplest solution is to use python 2.7.6 natively installed
$ brew uninstall python
# check follwoing commands if everything is ok
@miyamoto-daisuke
miyamoto-daisuke / vpc-knowhow-2014-04.template
Last active October 20, 2020 07:02
VPC knownhow 2014-04
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "VPC knowhow template",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",