Skip to content

Instantly share code, notes, and snippets.

@ValentynaGorbachenko
ValentynaGorbachenko / README.md
Created June 19, 2017 17:38 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@ValentynaGorbachenko
ValentynaGorbachenko / README-Template.md
Created November 27, 2016 19:33 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ValentynaGorbachenko
ValentynaGorbachenko / insertion_sort.js
Created October 13, 2016 00:04
insertion_sort created by ValentynaGorbachenko - https://repl.it/Dre9/1
// O(n^2) - time complexity
// O(1) - space complexity
// insertion sort
function insertionSort(arr){
// start loop from the second element in the Array
for (var i=1; i<arr.length; i++){
// store current elem
var temp = arr[i];
// start comparing current elem to the previous
@ValentynaGorbachenko
ValentynaGorbachenko / binary_search.js
Created October 12, 2016 22:11
binary_search created by ValentynaGorbachenko - https://repl.it/C74Z/12
// O(log(n)) - time complexity
// O(n) - space complexity
function binarySearch(arr,val){
if (arr.length === 0){return -1;}
var li = 0;
var hi = arr.length-1;
while(li<=hi){
var mid = Math.floor(li+(hi-li)/2);
@ValentynaGorbachenko
ValentynaGorbachenko / SLL_Node.js
Created October 12, 2016 22:09
SLL_Node created by ValentynaGorbachenko - https://repl.it/Dq2c/31
function SLL(){
this.head = null;
}
function Node(val){
this.val = val;
this.next = null;
}
@ValentynaGorbachenko
ValentynaGorbachenko / index.css
Created October 4, 2016 22:03
personalWeb created by ValentynaGorbachenko - https://repl.it/DoW8/0
body {
text-align: center;
background: #5c5c5c url("http://gorbachenko.byethost18.com/assets/background_picture.png") ;
background-size: cover;
background-position: center top left;
color: white;
font-family: helvetica;
}
p {
font-size: 22px;
@ValentynaGorbachenko
ValentynaGorbachenko / index.css
Created October 4, 2016 21:58
Valentyna'sBlog created by ValentynaGorbachenko - https://repl.it/DoWX/0
header {
text-align: center;
background: url('http://gorbachenko.byethost18.com/assets/blog_bg2.png');
background-size: cover;
color: white;
}
a {
text-decoration: none;
color: white;
}
@ValentynaGorbachenko
ValentynaGorbachenko / index.css
Created October 4, 2016 21:40
Valentyna's_bakary created by ValentynaGorbachenko - https://repl.it/DoVC/0
body {
font-family: helvetica, sans-serif;
margin: 0 auto;
/*max-width: 600px;*/
background: #232323;
}
div {
height: 200px;
background-size: cover;
position: relative;
@ValentynaGorbachenko
ValentynaGorbachenko / objects_inheritance.js
Created October 4, 2016 21:39
objects_inheritance created by ValentynaGorbachenko - https://repl.it/CcaY/9
//Objects
var literalObject = {
name: "literalObject",
property1: "some data", //string
property2: 3, // number
property3: [], //array
property4: {},
method1: function(){
var result = [];
for (var prop in this) {