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
#!/usr/bin/env bash | |
# Script to initialize OpenVPN on DD-WRT firmware | |
TUN=tun0 | |
ROUTER_USER=root | |
ROUTER_HOST=192.168.1.1 | |
ROUTER_SSH=$ROUTER_USER@$ROUTER_HOST | |
CONFIG_URL=https://nordvpn.com/api/files/zip | |
# Pipe input to a file on the router |
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
// Run this in console | |
[...document.querySelectorAll('.mtm')] | |
.map(group => [...group.querySelectorAll('.offer-price')] | |
.map(element => parseFloat(element.textContent.substring(1))) | |
.reduce((agg, value, i) => (agg + value) / (i ? 2 : 1), 0)) // Take average when product is available on multiple sites | |
.reduce((sum, value) => sum + value, 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
$('div button.red').each((i,t) => setTimeout(() => t.click(), 1000 * i)) |
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
public class Dexter { | |
private static String optimizedDirectory = "optimized"; | |
private static String workDirectory = "working"; | |
public static void loadFromAssets(Context context, String fileName) throws Exception { | |
File optimized = new File(optimizedDirectory); | |
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE); | |
optimized = new File(optimized, fileName); |