A simple bookmarklet to translate text on webpages.
Use the following snippet:
javascript:(async function () {
try {
const sel = window.getSelection();| echo "Installing git..." | |
| sudo apt install git-all | |
| echo "Completed!" | |
| echo "Installing ZSH..." | |
| sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
| echo "Configuring..." | |
| cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
| echo "Completed" | |
| echo "Installing Homebrew..." | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| function sir (rn, s, i, time, u, p) { | |
| data = { | |
| S: [s], | |
| I: [i], | |
| R: [p-(s+i)] | |
| } | |
| b = rn*u | |
| data = [0,1,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1] |
| <!DOCTYPE html> | |
| <html lang="en" dir="ltr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Design</title> | |
| <style> | |
| body{ | |
| margin: 0px; | |
| background-color: black; | |
| overflow-y: hidden; |
| var calc = function (amount) { | |
| var a = 1 //change the two variables to get a different fibbonacci sequence | |
| var b = 1 | |
| for(var i = 0; i < amount; i++) { | |
| var i = a+b | |
| b = a | |
| a = i | |
| } | |
| console.log(a) //outputs the 'amount' number in the fibbonacci sequence. | |
| } |
| var list = [1,1,1] //changing these values to [3,0,2] will output the perrin sequence | |
| var amount = 7 //changing this value will change the amount of numbers outputed. | |
| for(var i = 0; i < amount-3; i++) { //chaning the number that is subtracted from 'amount' is the original length of list | |
| var j = list[i]; | |
| var e = list[i+1]; | |
| list.push(j+e) | |
| } | |
| console.log(list) //change to 'document.body.innerHTML = list' to show on webpage or append to a div or paragraph if needed |
| var flip = function (dataArray) { | |
| var a = dataArray; | |
| for(var i = 0; i < a.length; i++) { | |
| var b = Math.random(0,1); | |
| var c = Math.round(b); | |
| if(c === 0) { | |
| a[i] = true; | |
| } | |
| if(c === 1) { | |
| var b1 = Math.random(0,1); |