Skip to content

Instantly share code, notes, and snippets.

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

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

基本ステップ

OS 環境の整備

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

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

@jsakamoto
jsakamoto / HomeController.cs
Created Jun 18, 2015
How to turn on/off on Raspberry Pi GPIO port 25 by ASP.NET MVC action method.
View HomeController.cs
// 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 Jun 23, 2014
How to enable Intelli Sense of .xml file by XSD on Visual Studio?
View xml.xml
<?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
EmbeddedResourceFileSystem2.cs
View 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;
View tellmewys-blog-parts.html
<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;
View bootstrap.py
import webbrowser
import SimpleHTTPServer
import thread
import time
import urllib
from zipfile import ZipFile
import os
tagname = "1.0"
zipname = "markdown-presenter-" + tagname + ".zip"
View _.bat
@powershell -nop -ex unrestricted -c "iex ((new-object net.webclient).DownloadString('http://goo.gl/2JUSZU'))"
View My-default-head-tag.html
<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 Sep 10, 2013
Study of CSS transition animation.
View index.html
<!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>