This is a how-to guide in order to block Spotify ads. However, this will also block most apps ads as apps usually use very similar ad providers.
This guide was done with the only aim of learning.
function Semaphore(max) { | |
var counter = 0; | |
var waiting = []; | |
var take = function() { | |
if (waiting.length > 0 && counter < max){ | |
counter++; | |
let promise = waiting.shift(); | |
promise.resolve(); | |
} |
initialize: function(options) { | |
this.plugins = _.union(this.plugins, ['LinkedModel']); | |
this._super('initialize', [options]); | |
//Example of use | |
this.search( 'ProductTemplates', 'revenuelineitem_templates','what I want to search' ); | |
}, | |
/** | |
@param module: The module of the collection you want to retrieve records from |
<?php | |
class AccessibilityClassHack { | |
/** | |
* Allows you to get the value of a protected or private property of an object | |
* @param $obj The class object of the property you want to get access to | |
* @param $prop The name of the property you want to get access to | |
* @return Returns the property $prop value of the object $obj | |
*/ |
const { Observable } = require('rxjs/Observable'); | |
require('rxjs/add/observable/fromEvent'); | |
require('rxjs/add/operator/map'); | |
require('rxjs/add/observable/merge'); | |
function createOnline$() { | |
//merge several events into one | |
return Observable.merge( | |
//use .map() to transform the returned Event type into a true/false value | |
Observable.fromEvent(window, 'offline').map(() => false), |
Here's my setup:
Complete up to the "Generate the cert" section in this gist
The apt-get version of node is incredibly old, and installing a new copy is a bit of a runaround.
So here's how you can use NVM to quickly get a fresh copy of Node on your new Bash on Windows install
$ touch ~/.bashrc
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
// restart bash
$ nvm install --lts
let pipe = function() { | |
let functions = arguments, | |
intermediate = undefined; | |
return function() { | |
intermediate = functions[0].apply(this, arguments); | |
for(let i = 1; i < functions.length; i++) { | |
intermediate = functions[i](intermediate); | |
} |
// this file also goes in custom/SUBPANEL_MODULE_NAME/clients/base/views/subpanel-list/ | |
({ | |
extendsFrom: 'SubpanelListView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
this.context.on('button:custom_action:click', this.customAction, this); | |
}, |
<?php | |
/** | |
* Project: SugarCRM Logic Expression for checking User role | |
* Original Dev: Antonio Musarra, January 2014 | |
* @2009-2014 Antonio Musarra <antonio.musarra[at]gmail.com> | |
* | |
* Desc: SugarCRM Logic Expression ext class | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by |