Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
jsakamoto / 01.note.md
Last active October 27, 2016 13:59
Jasmine による TypeScript/JavaScript 単体テストを実行する環境を作る - Grunt 編

注意 - 本記事の内容は古いです。karma をテストランナーに採用した、「Jasmine による TypeScript/JavaScript 単体テストを実行する環境を作る - karma 編」の採用をご検討ください。

基本ステップ

OS 環境の整備

  1. node.js をインストールしておく (Windows ならここからインストーラをダウンロード)
  2. > npm istall -g grunt-cli で、システムグローバルに grunt-cli をインストール

プロジェクトごとの環境構築

@jsakamoto
jsakamoto / HomeController.cs
Created June 18, 2015 14:01
How to turn on/off on Raspberry Pi GPIO port 25 by ASP.NET MVC action method.
// use TinyGPIO.cs
// https://github.com/sample-by-jsakamoto/SignalR-on-RaspberryPi/blob/master/myapp/TinyGPIO.cs
using myapp;
using System.Web.Mvc;
public class HomeController : Controller
{
[HttpPut]
public ActionResult TurnOnLED()
{
@jsakamoto
jsakamoto / xml.xml
Created June 23, 2014 05:24
How to enable Intelli Sense of .xml file by XSD on Visual Studio?
<?xml version="1.0" encoding="utf-16"?>
<root
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="full/path/of/.xsd">
</root>
@jsakamoto
jsakamoto / EmbeddedResourceFileSystem2.cs
Created May 31, 2014 11:56
EmbeddedResourceFileSystem2.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.Owin.FileSystems;
public class EmbeddedResourceFileSystem2 : IFileSystem
{
protected readonly EmbeddedResourceFileSystem _fileSystem;
<style>
#tell-me-wys-link {
position:fixed;
bottom:0;
right:-16.9em;
background-color: #fff;
border: solid 1px #ccc;
color:#444;
padding: 4px;
opacity:0.7;
import webbrowser
import SimpleHTTPServer
import thread
import time
import urllib
from zipfile import ZipFile
import os
tagname = "1.0"
zipname = "markdown-presenter-" + tagname + ".zip"
@jsakamoto
jsakamoto / _.bat
Last active December 27, 2015 18:19
@powershell -nop -ex unrestricted -c "iex ((new-object net.webclient).DownloadString('http://goo.gl/2JUSZU'))"
@jsakamoto
jsakamoto / My-default-head-tag.html
Last active January 22, 2016 12:35
my default meta tag
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
<meta name="viewport" content="width=device-width" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="twitter:card" content="summary">
<meta property="og:title" content="{TITLE}" />
<meta property="og:description" content="{DESCRIPTION}" />
<meta property="og:url" content="@Url.AppUrl()" />
<meta property="og:image" content="@Url.AppUrl()/Content/images/ogpimage.png" /><!-- The size of ogpimage.png is 120px x 120px. -->
<meta name="keywords" content="{KEYWORDS}" />
<meta name="description" content="{DESCRIPTION}" />
@jsakamoto
jsakamoto / index.html
Created September 10, 2013 23:27
Study of CSS transition animation.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<div class="demo">
<div class="text1">This is Text1.</div>
<div class="text2">This is Text2.</div>
document.write('(under construction...)');