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 source = document.getElementsByClassName("we-artwork__source") | |
const srcset = source[0].getAttribute('srcset'); | |
if (srcset){ | |
const imgURL = srcset.split(' ')[0].replace(/[^/]*\.jpg$/, "2000x0w.jpg") | |
window.open(imgURL) | |
} |
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
// 作成時点のバージョン: 1.4.15 | |
const {app, BrowserWindow} = require('electron'); | |
let win; | |
app.on('ready', () => { | |
win = new BrowserWindow({ | |
webPreferences: { nodeIntegration: false } | |
}); | |
win.loadURL('https://webrtc.github.io/samples/src/content/getusermedia/gum/'); | |
win.on('close', () => { | |
app.quit(); |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
<html> | |
<body> | |
<input type="button" value="Load" onclick="onButtonClick()"></input> | |
<webview id="webview0" src="https://example.com" style="display:inline-flex; width:640px; height:480px"></webview> | |
</body> | |
<script> | |
var handler = function(event, request, authInfo, callback){ | |
event.preventDefault(); | |
console.log(event); | |
console.log(request); |
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
app.on('certificate-error', function(event, webContents, url, error, certificate, callback) { | |
event.preventDefault(); | |
callback(true); | |
}); |
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
'use strict'; | |
const electron = require('electron'); | |
const app = electron.app; // Module to control application life. | |
const BrowserWindow = electron.BrowserWindow; // Module to create native browser window. | |
// Keep a global reference of the window object, if you don't, the window will | |
// be closed automatically when the JavaScript object is garbage collected. | |
var mainWindow = null; |
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
# add to .bashrc or .bash_profile | |
function docker-env(){ | |
eval "$(docker-machine env $@)" | |
} |
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
// wxWidgets "Hello world" Program | |
// For compilers that support precompilation, includes "wx/wx.h". | |
#include <wx/wxprec.h> | |
#ifndef WX_PRECOMP | |
#include <wx/wx.h> | |
#endif | |
//#define USE_GUI_THREAD | |
#ifdef USE_GUI_THREAD |
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
alias emacs='emacs -nw' | |
alias cmake-eclipse='cmake -G "Eclipse CDT4 - Unix Makefiles"' | |
alias ccmake-eclipse='ccmake -G "Eclipse CDT4 - Unix Makefiles"' |
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 <iostream> | |
#include <mrpt/utils.h> | |
#include <mrpt/gui.h> | |
class EventObserver : public mrpt::utils::CObserver{ | |
protected: | |
virtual void OnEvent(const mrpt::utils::mrptEvent &e){ | |
if(e.isOfType<mrpt::gui::mrptEventMouseDown>()){ | |
const mrpt::gui::mrptEventMouseDown *ev = e.getAs<mrpt::gui::mrptEventMouseDown>(); |
NewerOlder