Skip to content

Instantly share code, notes, and snippets.

@jz5
jz5 / custom.js
Last active August 29, 2015 14:20
$(function() {
$('img').each(function(){
this.src = "http://foodtero.azurewebsites.net/api/?url=" + encodeURIComponent(this.src);
});
});
Imports System.Drawing
Imports System.Net
Imports Microsoft.ProjectOxford.Vision
Public Class ApiController
Inherits System.Web.Mvc.Controller
Async Function Index(url As String) As Threading.Tasks.Task(Of ActionResult)
If url Is Nothing Then
Return New HttpStatusCodeResult(HttpStatusCode.BadRequest)
Dim client = New VisionServiceClient("**key**")
Dim result = Await client.AnalyzeImageAsync("画像 URL") ' 画像の Stream も指定可能
If result.Categories IsNot Nothing AndAlso result.Categories.Any AndAlso
result.Categories.First.Name.StartsWith("food_") Then
' (画像のカテゴリーが食べ物の場合)
End If
var faces = await App.Instance.DetectAsync(fileStream, false, true, true, false);
.monaco-editor.vs-dark,
.monaco-editor.vs-dark .zone-widget .monaco-editor,
.monaco-editor.vs-dark .lines-content.monaco-editor-background {
color: #BBB;
background: #1E1E1E;
background: url('http://pronama.jp/code/sd.png') no-repeat;
background-position: right bottom;
}
app.setUserTasks([
{
program: process.execPath,
arguments: '--new-window',
iconPath: process.execPath,
iconIndex: 0,
title: 'New Window',
description: 'Create a new winodw',
}
]);
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using io.js <script>document.write(process.version)</script>
and Electron <script>document.write(process.versions['electron'])</script>.
</body>
var app = require('app'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.
// Report crashes to our server.
require('crash-reporter').start();
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the javascript object is GCed.
var mainWindow = null;
{
"name" : "your-app",
"version" : "0.1.0",
"main" : "main.js"
}
@jz5
jz5 / style.css
Last active August 29, 2015 14:17
.telop {
font-size: 24px;
font-weight: bold;
display: inline-block;
position: relative;
background: linear-gradient(to right, #000 0,#000 0px,#ffffff 0px,#ffffff 100%);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;