Skip to content

Instantly share code, notes, and snippets.

@desktopgame
desktopgame / main.ts
Created April 26, 2020 13:35
typescript-electron-main
//
// https://github.com/electron/electron-quick-start-typescript
//
import { app, BrowserWindow } from "electron";
import * as path from "path";
let mainWindow: Electron.BrowserWindow;
function createWindow() {
// Create the browser window.
@desktopgame
desktopgame / preload.ts
Created April 26, 2020 23:33
typescript-electron-preload
//
// https://github.com/electron/electron-quick-start-typescript
//
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
window.addEventListener("DOMContentLoaded", () => {
const replaceText = (selector: string, text: string) => {
const element = document.getElementById(selector);
if (element) {
element.innerText = text;
@desktopgame
desktopgame / gulpfile.js
Created April 27, 2020 04:33
gulp-hello
var gulp = require('gulp');
gulp.task('hello', async () => {
console.log('hello, world');
});
@desktopgame
desktopgame / setup.py
Last active July 30, 2020 12:11
基本的な setup.py
# 【Techの道も一歩から】第21回「setup.pyを書いてpipでインストール可能にしよう」
# https://buildersbox.corp-sansan.com/entry/2019/07/11/110000
from glob import glob
from os.path import basename
from os.path import splitext
from setuptools import setup
from setuptools import find_packages
@desktopgame
desktopgame / MANIFEST.in
Created May 16, 2020 03:25
pythonのsetuptools用の設定
include requirements.txt
@desktopgame
desktopgame / launch.json
Created June 4, 2020 11:47
typescript-electron
{
"configurations": [
{
"name": "Debug",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/dist/main.js",
"preLaunchTask": "npm: build",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
@desktopgame
desktopgame / launch.json
Created June 4, 2020 11:49
vue-typescript-electron
{
"configurations": [
{
"name": "Debug",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/dist_electron",
"program": "${workspaceRoot}/dist_electron/bundled/background.js",
"preLaunchTask": "npm: electron:build",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
@desktopgame
desktopgame / main.cpp
Created June 28, 2020 03:03
emc_main
#include <iostream>
int main()
{
std::cout << "Hello World" << std::endl;
return 0;
}
cmake_minimum_required(VERSION 2.8)
set(CMAKE_BUILD_TYPE Debug)
add_executable(emc_sample main.cpp)
if (EMSCRIPTEN)
set(CMAKE_EXECUTABLE_SUFFIX ".html") # デフォルトでは.js
endif()
@desktopgame
desktopgame / Root.gitignore
Last active August 17, 2020 13:05
CMake Hello library example
CMakeFiles
Testing
cmake_install.cmake
CMakeCache.txt
CTestTestfile.cmake
Makefile
*.a
*.obj
*.lib