Skip to content

Instantly share code, notes, and snippets.

View artobay's full-sized avatar
🗝️
Consistency is the key.

Aliyar artobay

🗝️
Consistency is the key.
View GitHub Profile
@artobay
artobay / intro.md
Created February 15, 2020 20:00 — forked from derhuerst/intro.md
Installing Git on Linux, Mac OS X and Windows
@artobay
artobay / session2.md
Last active January 15, 2019 00:33
Interview prep

IMPORTANT MaxChar --> giving string return the character that is most commonly used in the string

  • Does String A have the same character as string B
  • Does the given string have any repated characters in it?

  • Try to change the string to the object --> keys are characters from the string and values are the number of times that character repated

First lets create a new object and pass the string to it.

@artobay
artobay / form.php
Created July 20, 2018 00:35
wordpress
Please read our FAQ before sending us a message.
[accordion]
[accordion-item title="What are the delivery charges for orders from the Online Shop?"]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean id convallis tellus. Nulla aliquam in mi et convallis. Pellentesque rutrum feugiat ante ut imperdiet. Vivamus et dolor nec nisl consectetur vulputate id non ante.
[/accordion-item]
[accordion-item title="Which payment methods are accepted in the Online Shop?"]
@artobay
artobay / toDoListReact.md
Last active June 13, 2018 16:32
toDoList with React and FireBase

https://www.youtube.com/watch?v=-RtJroTMDf4

  • npm install -g create-react-app globally will install react app, this will help us scafold new React app
  • create-react-app reactnotes generates the React application dependencies, packages, react-dom...
  • cd reactnotes
  • ls -la --> show you the all files structure

  • Install all the necessary dependencies for this project
  • npm install --save firebase--> using firebase for your backend
  • npm start

@artobay
artobay / State.md
Created June 12, 2018 04:00
State in React

https://www.youtube.com/watch?v=qh3dYM6Keuw

State:

  • by default is null so you can set it to what you want
  • only place you set your initial state is in constructor
  • whenever state changes it will rerender and update the DOM it will only updated affected node no lets see how we change it
  • go in the render method then you can change the set for ex:
  • React take care of DOM manipulation for us.
  • Use State --> only get used when component has internal value and that only affect that component.
@artobay
artobay / JSON.md
Last active June 11, 2018 21:09
What is JSON
  1. JS Object Notation --> based on a subset of JS
  2. Easy to Read and Write
  3. Often used with AJAX --> What is AJAX ? send data back and forth between client and server without having to refresh the browser.
  4. JSON can be parsed and used with most modern languages.

LEARN --> Please show me how to create JSON objects and arrays and also how to make an Ajax request to a .json file --> Working with RESTFULL_APIs --> "Application/json" --> JSON Object vs JS Object

DATA Types

  1. If we have some dynamic content that we want to place JSX we should place it in {} for example -->

    Im a Person and I am {Math.floor(Math.random()*30)} years old!

We can call functions which will execute some code too, but we have to place it in curly braces

Working with Props

  1. We use Props to pass data between components!, means that we can pass properites on element(jsx component) by props

  2. Porps is simply an object that give us acces to all the attributes we pass to our own components.

@artobay
artobay / htttp.md
Last active June 8, 2018 19:16
Http Requet and APIs
  1. http is an application layer protocol that allows web-based application to communicate and exchange data
  2. http is the messenger of the web
  3. http used to deliver contents
  4. http is a stateless protocol --> the client and server know about each other just during the current request
  5. it means when two computer wants to connet again, they need to provide information to each other again

  1. http was designed mainly to fetch html documents and sends it to the client.
  2. browser sends request (htttp message) --> then client disconnected and wait for the respond
@artobay
artobay / Rest.md
Last active June 7, 2018 20:24
What is REST in RoR

Representational state transfer

  1. It doesnt have state. It doesnt care about other pages (restful)
  2. Dont perform on procedure. | Using hashes | Routes
  3. It will give you a free API | It will give you a convention

REST HTTP Verbs 2018-06-07

@artobay
artobay / React1.md
Last active June 12, 2018 23:38
React by Stephen Grider

s1 l1

  1. github.com/stephengrider
  2. all codes for this course --> https://github.com/StephenGrider/ReduxCasts

s1 l2 l3 l4

  1. ES6 --> transpile through (webpack + babel) --> to index.html | application.js | style.css
  2. get the repo ReduxSimpleStarter --> git clone ...
  3. Go to that directory by cd ProjectName , we need to run npm install