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 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); |
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 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 |
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 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. | |
} |
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
<!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; |
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
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] |
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 sir (rn, s, i, time, u, p) { | |
data = { | |
S: [s], | |
I: [i], | |
R: [p-(s+i)] | |
} | |
b = rn*u | |
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
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)" |