This file contains hidden or 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
# How to fully uninstall Logitech G HUB on macOS via terminal/command line | |
# Tested on macOS version 12.3.1 (21E258) Monterey in April 2022 | |
# with Logitech G HUB version 2022.3.242300 (released on 2022-03-22) installed. | |
# 1. Make sure "Logitech G HUB" itself is not running. If it is, quit it. | |
# 2. Open "Activity Monitor" and force-quit all processes named "lghub*". | |
# 3. Delete system-wide files | |
sudo rm -rf /Applications/lghub.app |
This file contains hidden or 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
// Optimal amount of profit (in EUR) to be gained from ETF sale | |
const optimalProfit = 1144.29 | |
// Sale price (bid) of one share of the ETF in EUR | |
const bidPrice = 103.74; | |
// Amount of shares I own in chronologically ascending order. | |
// (first element = oldest shares) | |
const shares = [ | |
// amount, share price at the time in EUR |
This file contains hidden or 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 arr1 = ["100730651975","100727767835","100731535949","100734119022","100731395492","100730978223","100723043671","100729513754","100731428590","100730087084","100731202777","100730337035","100731122761","100730787720","100730178609","100734126093","100731453507","100730654591","100730236974","100734127056"]; | |
const arr2 = ["100730178609", "100730654591", "100730651975", "100730087084", "100727767835", "100731535949", "100731395492", "100723043671", "100730978223", "100729513754", "100731202777", "100731428590", "100731122761", "100730787720", "100731453507", "100730236974", "100734127056"]; | |
const compareArrays = (a, b) => { | |
const setOfA = new Set(a); | |
const setOfB = new Set(b); | |
const intersection = new Set(); // elements in both A and B | |
const differenceB = new Set(); // elements in B but not in A |
This file contains hidden or 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 Boom = require('boom'); | |
const headerPattern = /^Bearer (.+)/; | |
const testAuth = (request, strategy) => new Promise((resolve, reject) => { | |
request.server.auth.test(strategy, request, (error, credentials) => { | |
if (error === null) { | |
resolve(credentials); | |
} else { | |
reject(error); |
This file contains hidden or 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
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 ) | |
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) | |
# without using Razer's official uninstall tool. | |
# Tested on OS X 10.11.5 in July 2016. | |
# Edited with additional steps for later OS X versions, | |
# contributed by commenters on this gist. | |
# Step 1: In your terminal: stop and remove launch agents | |
launchctl remove com.razer.rzupdater |
This file contains hidden or 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.prototype.curryAndCall = function () { | |
var args = Array.prototype.slice.call(arguments); | |
var curry = function (originalFunc, collectedArgs) { | |
return function () { | |
var args = Array.prototype.slice.call(arguments); | |
if (args.length + collectedArgs.length >= originalFunc.length) { | |
return originalFunc.apply(originalFunc, collectedArgs.concat(args)); | |
} else { | |
return curry(originalFunc, collectedArgs.concat(args)); |
This file contains hidden or 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 () { | |
var span, eventTypes = [ | |
'click', 'mousedown', 'mouseup', 'mouseover', 'mousemove', 'mouseout', | |
'touchstart', 'touchend', 'touchmove', 'touchcancel', 'touchleave' | |
]; | |
var header = document.querySelector('#header .header-wrap'); | |
// Log a single gesture to the console and show it at the top of the page. | |
function logEvent (event) { |