-
TypeScript
: AltJS-
webpack
: Serverless Framework の TypeScript テンプレートで使用 -
node-canvas
: 画像ジェネレーターの中核を担うサーバーサイド canvas -
Jest
: テストは Jest のみを使用
-
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('load', function(){ | |
navigator.mediaDevices.getUserMedia({audio: false, video: true}).then((stream) => { | |
const video = document.createElement('video'); | |
video.id = 'drag'; | |
video.draggable=true; | |
document.body.appendChild(video); | |
video.src=window.URL.createObjectURL(stream); | |
video.style='position: absolute; left: 10px; top: 10px; max-width: 300px; max-height: 300px; border: 1vmin solid white; z-index:99999;'; | |
video.play(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using CoreAudioApi; | |
namespace DeviceManager.Volume | |
{ | |
class VolumeController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AttachConsoleSample | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DllImport("kernel32.dll")] | |
public static extern bool AttachConsole(uint dwProcessId); | |
[DllImport("kernel32.dll")] | |
public static extern bool FreeConsole(); | |
private bool writeConsole( string msg ) { | |
if ( !AttachConsole( System.UInt32.MaxValue ) ) { | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const log = require('electron-log-rotate'); | |
module.exports = { | |
// path.resolve([from ...], to) | |
resolve: function resolve() { | |
var resolvedDevice = ''; | |
var resolvedTail = ''; | |
var resolvedAbsolute = false; | |
for (var i = arguments.length - 1; i >= -1; i--) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <nan.h> | |
void Method(const Nan::FunctionCallbackInfo<v8::Value>& info) { | |
info.GetReturnValue().Set(Nan::New("world").ToLocalChecked()); | |
} | |
void Init(v8::Local<v8::Object> exports) { | |
exports->Set(Nan::New("hello").ToLocalChecked(), | |
Nan::New<v8::FunctionTemplate>(Method)->GetFunction()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <node.h> | |
#include <v8.h> | |
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) { | |
v8::Isolate* isolate = args.GetIsolate(); | |
v8::HandleScope scope(isolate); | |
args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); | |
} | |
void init(v8::Local<v8::Object> exports) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = { | |
x: 1, | |
[Symbol.toPrimitive]: function(type) { | |
console.log('called toPrimitive, type: ', type); | |
return this.x; | |
} | |
}; | |
Number(a); |