Skip to content

Instantly share code, notes, and snippets.

View Anna-Myzukina's full-sized avatar
💭
if you NEVER try } YOU`LL never KNOW

Anna Muzykina Anna-Myzukina

💭
if you NEVER try } YOU`LL never KNOW
View GitHub Profile
@Anna-Myzukina
Anna-Myzukina / 1-intake.js
Last active September 28, 2018 18:07
bug-clinic
//Exercise 1
/*To proceed, write a program that prints "i am okay" to standard output
and "i am so incredibly not okay" to standard error.
*/
console.log('i am okay');
console.error('i am so incredibly not okay');
@Anna-Myzukina
Anna-Myzukina / 1-hello.bash
Last active September 15, 2018 20:22
learnyoubash
#!/usr/bin/env bash
echo "Hello, world!"
#1.touch hello.bash
#2.chmod +x hello.bash
#3. ./hello.bash
@Anna-Myzukina
Anna-Myzukina / Main.js
Last active September 13, 2018 16:56
tower-of-babel
//Exercise 4
var arg1 = process.argv[2];
var arg2 = process.argv[3];
import {PI, sqrt, square} from './Math';
console.log(PI);
console.log(sqrt(+arg1));
console.log(square(+arg2));
@Anna-Myzukina
Anna-Myzukina / 1-README.md
Last active December 3, 2021 15:18
learnyoumongodb

//Exercise 1 Install mongodb from:

  1. https://www.mongodb.org/downloads. or sudo apt install mongodb

To verify that mongod is installed, you can try running mongod --version

//Exercise 2 Start mongod on port 27017 with data as the dbpath 1.at first terminal : mkdir data , next cd data , next mongod --port 27017 --dbpath=./data 2.at onother terminal run npm install mongodb

@Anna-Myzukina
Anna-Myzukina / AsyncLoops.js
Last active May 22, 2024 19:49
functional-javascript-workshop
//Exercise 15
/*Fix this code! The callback should be called with all the users loaded.
The order of the users should match the order of supplied user ids. Because this
function is asynchronous, we do not care about its return value.
# Arguments
* userIds: an Array of numeric user ids.
* load: a Function used to load user objects. Expects a numeric id and a callback.
* The callback will be called with the result of loading the user with the specified id
* (either a user object or null).
* done: a Function that expects an Array of user objects (as retrieved from `load`).
@Anna-Myzukina
Anna-Myzukina / beep_boop.js
Last active September 10, 2018 16:24
stream-adventure
//Exercise 1
/**
* Make a new directory for your stream-adventure solutions (mkdir stream-adventure and enter it cd ./stream-adventure)
Create a new file called beep_boop.js that uses console.log to output "beep boop".
*/
console.log("beep boop");
@Anna-Myzukina
Anna-Myzukina / .npmrc
Last active September 10, 2018 04:49
how-to-npm
registry = http://localhost:15443/
userconfig = /home/anna/.config/how-to-npm/npmrc
@Anna-Myzukina
Anna-Myzukina / babelSetup.js
Created September 4, 2018 20:19
tower-of-babel
// Exercise 1
/**
Create a javascript program that takes the the first command-line argument and
outputs it right after a "Hello " String using ES6 template strings
*/
var arg = process.argv[2];
console.log(`Hello ${arg}`);
@Anna-Myzukina
Anna-Myzukina / 1-helloWorld.js
Last active September 15, 2018 15:40
expressworks
/*Exercise 1
Create an Express.js app that outputs "Hello World!" when somebody goes to /home.The port number will be provided to you by expressworks as the first argument ofthe application, i.e., process.argv[2]
*/
var express = require('express')
var app = express()
app.get('/home', function(req, res) {
res.end('Hello World!')
})
app.listen(process.argv[2])
@Anna-Myzukina
Anna-Myzukina / alteration.js
Last active September 4, 2018 05:44
regex-adventure
//Exercise 11
/*Export a function that takes a string argument and returns whether the string starts with `cat`, `dog`, or `robot` followed by a number to the end of the string
*/
module.exports = function (str) {
return /^(cat|dog|robot)\d+$/.test(str);
}