This file contains hidden or 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
import Vue from 'vue' | |
import Greeting from 'src/components/Greeting.vue' | |
function getInstance (Component, propsData) { | |
const Ctor = Vue.extend(Component) | |
const vm = new Ctor({ propsData }).$mount() | |
return vm | |
} | |
describe('Greeting.vue', () => { |
This file contains hidden or 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
function createWindow () { | |
// Create the browser window. | |
--- mainWindow = new BrowserWindow({width: 800, height: 600}) | |
+++ mainWindow = new BrowserWindow({titleBarStyle: 'hidden',width: 800, height: 600}) |
This file contains hidden or 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 $ = e=>document.querySelector(e); | |
const webview = $("webview"); | |
webview.addEventListener("did-stop-loading", ()=>{ | |
webview.executeJavaScript( | |
`color:{$("#col_channels_bg").css("backgroundColor")}`, | |
false, | |
function(color){ | |
console.log(color); // rgb(100, 100, 100); | |
// 決してcolor.colorではなく、colorでアクセスすることになるので注意 | |
} |
This file contains hidden or 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
.spotlight{ | |
position: absolute; | |
left: 0; | |
top : 0; | |
width: 100vw; | |
height: 100vh; | |
background: radial-gradient(transparent, transparent 100px, rgba(0,0,0,0.4) 100px, rgba(0,0,0,0.4)); |
This file contains hidden or 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
<?php | |
namespace Utilitys; | |
class Response | |
{ | |
private static $instance; | |
/** | |
* getInstance | |
* |
This file contains hidden or 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
<?php | |
function prev_life($count){ | |
$life = ""; | |
for ($i=0; $i < $count; $i++) { | |
$life .= "前"; | |
} | |
return $life; | |
} |
This file contains hidden or 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
/path/to/pre-commit-sample/index.js | |
1:1 error Unexpected var, use let or const instead no-var | |
✖ 1 problem (1 error, 0 warnings) | |
pre-commit: | |
pre-commit: We've failed to pass the specified git pre-commit hooks as the `test` | |
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can | |
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit: | |
pre-commit: |
This file contains hidden or 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
<template lang="html"> | |
<p>Hello.</p> | |
</template> | |
<style lang="css"></style> | |
<script> | |
module.exports = {}; | |
</script> |
This file contains hidden or 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 path = require("path"); | |
const userHome = process.env[process.platform == "win32" ? "USERPROFILE" : "HOME"]; | |
console.log(path.join(userHome, "Desktop")); | |
// /Users/foo/Desktop | |
console.log(path.join(userHome, "Documents")); | |
// /Users/foo/Documents |
This file contains hidden or 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
$ apm install terminal-plus |