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
// ==UserScript== | |
// @name New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://*/* | |
// @match https://*/* | |
// @grant none | |
// ==/UserScript== |
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
// @see https://habr.com/ru/post/204628/ | |
// @see http://jsfiddle.net/Imater/5Lqx7/ | |
//парсер даты (позвонить послезавтра) | |
function jsParseDate(title) { | |
title = title.replace('одинадцать', '11') | |
.replace('двенадцать', '12') | |
.replace('тринадцать', '13') | |
.replace('четырнадцать', '14') | |
.replace('пятнадцать', '15') |
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
#!/bin/bash | |
mkdir -p build.diffs; | |
i=0; | |
# put your docker build at enxt line. required `--no-cache --rm=false` | |
docker build --no-cache --rm=false -t docker101tutorial . | | |
grep -Pzo 'Step(.*)\n ---> Running .*\n' | | |
while read -r line && read -r line2; | |
do |
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
function createTrigger() { | |
ScriptApp.newTrigger('main') | |
.timeBased() | |
.everyDays(1) | |
.create(); | |
} | |
function main() { | |
const {tmp, from, to} = getCalendars(); | |
const syncedEvents = getEvents(to) |
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
mainWindow = new BrowserWindow({ | |
webPreferences: { | |
nativeWindowOpen: true,// window.open return Window object(like in regular browsers), not BrowserWindowProxy | |
affinity: 'main-window'// main window, and addition windows should work in one process | |
} | |
}); | |
mainWindow.webContents.on('new-window', function (e, url, frameName, disposition, options) { | |
// hook on new opened window |
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
let sinon = require('.'); | |
class Foo { | |
bar() { | |
} | |
} | |
test('without stubing'); | |
sinon.stub(Foo.prototype, 'bar').callsFake(function() {}); | |
test('with stubing'); |