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
/* | |
* ATTENTION: This script will unfollow all accounts, you load on your profile page | |
* To do that: | |
* 1. Open your twitter profile following tab: https://twitter.com/YOURUSERNAME/following | |
* 2. Run this script on the console | |
* This script is really simple, it will unfollow only the actual loaded accounts, | |
* so you have to scroll down and rerun the script if you want to unfollow more accounts | |
*/ | |
function delay(timeInMs = 100) { | |
return new Promise(resolve => { |
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
var bufferingSimulator = (function () { | |
var facade = require('logic/event/facade'); | |
var bufferingIntervalId, | |
lastBufferingTimeoutId, | |
bufferingFrequencyInMs = 5000, | |
bufferingDurationInMs = 2000; | |
function startBuffering () { | |
clear(); | |
var counter = 0; |
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
var helloWorldObservable = null; | |
var buttonClickObservable = Rx.Observable.create(function(observer) { | |
var clickerListener = function() { | |
observer.onNext(true); | |
console.log("clicker was clicked") | |
}; | |
var clickerBtn = $("#clicker"); |
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 calculateAllCrossProduct(points) { | |
var lastSign = null; | |
for (var i = 2; i < points.length; i++) { | |
//calculate crossproduct from 3 consecutive points | |
var crossproduct = calculateCrossProduct(points[i - 2], points[i - 1], points[i]); | |
console.log(i + ". crossproduct from ("+ points[i - 2].x +" "+points[i - 1].x +" "+points[i].x +"): " + crossproduct); | |
var currentSign = Math.sign(crossproduct); | |
if (lastSign == null) { | |
//last sign init |