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
| // 1. Write a function that changes the background color of a website | |
| function changeBackground(){ | |
| // 2. Write an array of color strings | |
| var colors = ['red', 'green', 'orange', 'purple', 'blue']; | |
| // 3. Have your color change function randomly select one of the colors from that array | |
| var colorChoice = colors[ Math.floor( Math.random() * colors.length ) ]; |
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 isPrime(n){ | |
| for(var i=2; i<n; i++){ | |
| if(n%i===0){ | |
| return false; | |
| } | |
| } | |
| return true; | |
| } |
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
| #rbenv install ruby with yosemite ruby build error: Using clang rbenv install | |
| CONFIGURE_OPTS=--with-gcc=clang rbenv install 2.2.2 | |
| #Nokogiri | |
| brew update | |
| brew install libiconv | |
| brew link libiconv | |
| brew install libxml2 | |
| brew link libxml2 --force |
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
| #!/usr/bin/env bash | |
| while getopts "vf" FLAG; do | |
| case $FLAG in | |
| f ) FORCE=true;; | |
| v ) VERBOSE=true;; | |
| ? ) exit 2;; | |
| esac | |
| done |
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
| model_Name="Rainbow" | |
| model_name="rainbow" | |
| db_name="i_am_a_rainbow" | |
| table_name="rainbows" | |
| # ONLY EDIT ABOVE HERE... | |
| # Styles | |
| mkdir public |
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
| while true; do clear; tree; sleep 1; done |
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
| var pics = document.getElementsByTagName('img'); | |
| for (var i=0; i<pics.length; i++){ | |
| pics[i].src = 'http://wdi-woodstock.com/sass.jpg'; | |
| } |
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 randomColor() { | |
| red = Math.floor(Math.random()*255); | |
| green = Math.floor(Math.random()*255); | |
| blue = Math.floor(Math.random()*255); | |
| return 'rgb('+red+','+green+','+blue+')'; | |
| } | |
| function messingWithArticles(){ | |
| var articles = document.body.getElementsByTagName('article'); | |
| for (var i=0; i<articles.length; i++){ |
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
| var user = { | |
| name: 'Lichard DeGray', | |
| age: 65, | |
| email: 'lichyLich803@aol.com', | |
| username: 'lichyLich803', | |
| friends: ['omily53', 'katkatPapaSmurf', 'annie.lin'], | |
| post: function(){ | |
| // Do all the stuff needed to post a entry/post | |
| // return 'I posted as ' + this['name']; | |
| return 'I posted as ' + this.name; |
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
| var handle = setInterval(function(){ | |
| $($('.nav-appendPager')[0]).trigger('click'); | |
| }, 250); | |
| var names = []; | |
| setTimeout(function(){ | |
| clearInterval(handle); | |
| var members = $('.member-name') |