Skip to content

Instantly share code, notes, and snippets.

View romanych's full-sized avatar

Roman Gomolko romanych

  • AudienceProject
  • Dnepropetrovsk, Ukraine
View GitHub Profile
@romanych
romanych / index.js
Created December 3, 2020 16:36
Miniproxy for DV360 IR
const axios = require("axios");
const rax = require("retry-axios");
const { GoogleAuth } = require('google-auth-library');
async function getDV360AccessToken() {
const auth = new GoogleAuth({ scopes: [ 'https://www.googleapis.com/auth/doubleclickbidmanager' ] });
return await auth.getAccessToken();
};
const Functions = new function () {
@romanych
romanych / fif.js
Created April 29, 2016 13:23 — forked from jasdeepkhalsa/fif.js
Friendly iFrames (FIF) - Loading JavaScript Asynchronously Without Blocking window.onload by Stoyan Stefanov. Designed for loading third party scripts only (for first party scripts this script may have a negative performance impact, as tested by Yahoo)
// Documented by Stoyan Stefanov: https://www.facebook.com/note.php?note_id=10151176218703920
(function() {
var url = 'http://example.org/js.js';
var iframe = document.createElement('iframe');
(iframe.frameElement || iframe).style.cssText =
"width: 0; height: 0; border: 0";
iframe.src = "javascript:false";
var where = document.getElementsByTagName('script')[0];
where.parentNode.insertBefore(iframe, where);
var doc = iframe.contentWindow.document;
@romanych
romanych / knockout-jquery-ui-widget.js
Created September 22, 2011 13:57 — forked from medmunds/knockout-jquery-ui-widget.js
Knockout binding for jQuery.ui.widget
// knockout-jquery-ui-widget.js
// Copyright (c) 2011, Planapple, Inc.
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
//
// Knockout binding for jQuery UI widgets
//
// Examples:
// <input type="submit" value="OK" data-bind='jqueryui: "button"' />
//
// Attaches a jQuery UI button widget to this button, with default options.