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
import uuidv4 from "uuid/v4"; | |
class CurrentTab { | |
/** | |
* create a new tabid or grab it from storage | |
* | |
* @constructor | |
*/ | |
constructor() { | |
this.debug = DEVELOPMENT; |
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 fs = require('fs'); | |
const log = require('simple-node-logger').createSimpleLogger({}); | |
const { container, Helper } = require('codeceptjs'); | |
const allureCLI = require('allure-commandline'); | |
/** | |
* this plugin will add videos of failed tests generated by Playwright to the allure and reportportal reports | |
*/ | |
class ReportingHelper extends Helper { | |
async _attachVideo(test) { |
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 view; | |
const viewporter = {}; | |
const html = document.documentElement; | |
viewporter.getView = () => { | |
try { | |
view = window | |
.getComputedStyle(html, ":after") | |
.getPropertyValue("content") | |
.replace(/["']/g, ""); |
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 debounce = (fn, time) => { | |
let timeout; | |
return function() { | |
const functionCall = () => fn.apply(this, arguments); | |
clearTimeout(timeout); | |
timeout = setTimeout(functionCall, time); | |
} | |
} |
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
/** | |
* @module fullscreen helper | |
* @description detection and handling of fullscreen capabilities | |
* @returns {Object} | |
*/ | |
export default { | |
/** | |
* Returns vendor prefixed fullscreenchange event | |
* @returns String | |
*/ |
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.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
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 SPON Maffayisiert | |
// @namespace peter | |
// @include http://www.spiegel.de/* | |
// @downloadURL https://gist.github.com/shapeshifta78/1f164172e5c4c13542ab | |
// @version 1 | |
// @grant none | |
// @run-at document-idle | |
// ==/UserScript== | |
window.setTimeout(function () { |
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 (w) { | |
w.location.hash = '#no-back'; | |
var historyApi = (typeof w.history.pushState !== 'undefined'); | |
if (w.location.hash == '#no-back') { | |
if (historyApi) { | |
w.history.pushState(null, '', '#stay'); | |
} else { | |
w.location.hash = '#stay'; |
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
$('#slider').on('touchstart touchmove touchend', 'a.ui-slider-handle', function (event) { | |
//mousevents to simulate on touch | |
var touchEvents = { | |
touchstart: 'mousedown', | |
touchmove: 'mousemove', | |
touchend: 'mouseup' | |
}; | |
//get element and type of event to simulate | |
var simulatedEvent = touchEvents[event.originalEvent.type], |
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
<?php | |
$url = $_GET['url']; | |
$allowedurls = array( | |
'http://developer.yahoo.com', | |
'http://icant.co.uk' | |
); | |
if(in_array($url,$allowedurls)){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
NewerOlder