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
// Declare our variables | |
const prompt = require('readline-sync'); | |
let maxGuesses = 3; | |
let currentGuess = 0; | |
const maxRange = 10; | |
// Generate random number | |
let randomNumber = Math.floor(Math.random() * maxRange + 1); | |
// console.log('Random number: ', randomNumber); | |
// Get user name |
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
class UrlParser | |
def initialize(new_url) | |
@new_url = new_url | |
end | |
def scheme | |
scheme = @new_url.split('://')[0] | |
end |
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
// 2. Fill in the missing line: | |
// return the index of the minimum element in an array -- find minimum value in array and return index | |
// [2, 4, 1, 5] | |
function minValueIndex(array) { | |
var min_index = -1; | |
var min_value = 0; | |
for (var i = 0; i < array.length; ++i) { | |
if (array[i] < min_value || min_index == -1) { | |
min_index = i; | |
min_value = array[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
RSpec.configure do |config| | |
config.color = true | |
config.formatter = 'doc' | |
end | |
it 'Chrome is installed!' do | |
chrome_search = `which google-chrome` | |
expect(chrome_search).to_not be_empty, "Chrome isn't installed." | |
end |
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
RSpec.configure do |config| | |
config.color = true | |
config.formatter = 'doc' | |
end | |
def lsregister_grep(search) | |
`/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/\ | |
lsregister -dump | grep -i "#{search}"` | |
end | |
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
@import url('https://fonts.googleapis.com/css?family=Nunito+Sans:300,300i,700,700i&subset=latin-ext,vietnamese'); | |
@import url('https://fonts.googleapis.com/css?family=Open+Sans%7CRajdhani&display=swap'); | |
body{ | |
font-family: "Open Sans" !important; | |
background-image: url('https://leo.nyc3.digitaloceanspaces.com/wynassets/wyncode-logo-blue.png'); | |
background-repeat: no-repeat; | |
background-size: 200px 200px; | |
background-position: 50% 50px; | |
} |
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
rbenv install $(rbenv install -l | grep -v - | tail -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
fetch(url) | |
.then(data => { | |
return data.json() | |
}) | |
.then(res => { | |
console.log(res) | |
}) | |
.catch(err => { | |
console.log(err) | |
}) |
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
## Custom Aliases | |
# | |
# Make sure to paste this snippet in your ~/.bashrc | |
# | |
# if [ -e $HOME/.bash_aliases ]; then | |
# source $HOME/.bash_aliases | |
# fi | |
alias c='clear' | |
alias ..='cd ..' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer