Skip to content

Instantly share code, notes, and snippets.

View tamasmagyarhunor88's full-sized avatar
⌨️
I may be slow to respond.

Tamás Magyar-Hunor tamasmagyarhunor88

⌨️
I may be slow to respond.
  • Makers
  • London UK
View GitHub Profile
@Kotauror
Kotauror / srand.md
Last active May 14, 2019 09:09
srand in RSPEC stubbing.

srand in RSPEC stubbing.

Without further ado - some thoughts on how to use srand in RSPEC testing. Example at the end.

How does the srand work line by line.

Line Input Output
1 srand(4) 281462327676453734791076087004180619592
@Kotauror
Kotauror / ruby_postgres_magic.md
Created February 13, 2018 21:23
Ruby + Postgresql - understanding the magic. This is my early attempt at understanding the magic which makes my ruby app work and connect to postgresql database.

Ruby + Postgresql - understanding the magic.

This is my early attempt at understanding the magic which makes my ruby app work and connect to postgresql database.

Program at the moment:

CONTROLLER :

app.rb

require 'sinatra/base'
@Kotauror
Kotauror / Ruby_to_JS.md
Created February 19, 2018 21:42
FizzBuzz in Javascript line by line.

FizzBuzz in Javascript line by line.

With comparisons to Ruby.

function FizzBuzz() {

}
  • First we create a function FizzBuzz that takes no arguments.
@Kotauror
Kotauror / events.md
Last active February 26, 2018 21:52
How to make an HTML form interact with JS.

Events in jQuery - How to make an HTML form interact with JS.

Caution: MINDBLOWING!

[[[ EDIT ----- I've found an easier way to get the information from form - update at the end ]]]

I would like to share with you a thing that I've learned today. Thank you Sofie and Matt for helping me understand that.

Let's get straight into the problem. I have a static html website with (among others) a form to increase a temperature.

@Kotauror
Kotauror / notes.md
Created February 26, 2018 21:16
Introduction to sequelise / node and other js stuff.

Sequelize - basic notes.

This note contains some remarks on my first (and painful) attempt to switch from ruby+postgres to javascript+postgres.

// thanks to Marcus & Ben for the introduction.

SETUP:

$ npm init -y