Skip to content

Instantly share code, notes, and snippets.

View somahargitai's full-sized avatar

Soma somahargitai

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NumberSets
{
class Program
{
import sinon from 'sinon';
import expect from 'chai';
import factory from '../../../factory';
import * as resolvers from '../../../graphql/resolvers';
import * as service from '../../../services/service';
describe('resolvers', async () => {
let sandbox;
beforeEach(() => {
sandbox = sinon.sandbox.create();
@somahargitai
somahargitai / ForInterviewers.MD
Last active September 10, 2018 23:56
IT interview questions

What you should not do?

  • If the candidate has no clue about a main theoritical answer, don't expect to invent it in that moment. There are typical programming exercises which can be learnt or can be figured out in that very moment. But it is a ridiculous expectation that the candidate will figure out big programming concepts during an interview.
@somahargitai
somahargitai / tokeletes.java
Created January 15, 2019 00:13
Tökéletes Szám ellenőrzés
public class TokeletesDetektorClass{
public static void main(String []args){
System.out.println("Hello World");
int tokeletese1 = 6;
int tokeletese2 = 7;
System.out.println(tokeletesSzamDetektor(tokeletese1));
System.out.println(tokeletesSzamDetektor(tokeletese2));
const int controlPin1 = 2;
const int controlPin2 = 3;
const int enablePin = 9;
const int directionSwitchPin = 4;
const int onOffSwitchStateSwitchPin = 5;
const int potPin = A0;
int onOffSwitchState = 0;
int previousOnOffSwitchState = 0;
int directionSwitchState = 0;
int previousDirectionSwitchState = 0;
@somahargitai
somahargitai / TheoreticalProgrammingFAQ.MD
Last active May 5, 2019 10:12
Theoretical Programming FAQ - Questions which usually don't change anything but some coders worry about so much

Theoretical Programming FAQ

Definition of "programming language"

(1) Is HTML a programming language? And CSS?

HTML can be examined as a programming language, but its goal is different than of "classic" programming languages, that's why we have the category of markup languages. So basicly no, it is not by definition.

The question roots in the Duck Test:
If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.

@somahargitai
somahargitai / HtmlCssCheatsheet.MD
Last active July 18, 2019 08:58
HTML and CSS cheatsheet, showing some important details
@somahargitai
somahargitai / TerminalToolset.MD
Last active July 18, 2019 08:59
Terminal programs to increase productivity

cheatsheet list

Using multiple terminal windows

Is is a quite usual use case that you want to use several terminal windows: you work on several different locations, you run different services at the same time without doing it in the background and so on. On typical solution is to use tabs: Mac Terminal has this capability, on Linux you can do it with Gnome Terminal. Other solution is to split the terminal to panes, twux does it for you.

My recommendation is to use two tabs and in one of the tabs open twux panes for services.

Gnome Terminal

command: gnome-terminal

@somahargitai
somahargitai / NoSQLdb.MD
Last active July 18, 2019 08:59
My Notes on creating and handling MongoDB, DynamoDB or other NoSQL databases.

cheatsheet list

MongoDB

Create and start

  • Windows create a mongodb folder in C: (or wherever you want)
    mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --logappend --rest --install

net start MongoDB - start it with net which is to handle services

@somahargitai
somahargitai / reboottodo.MD
Last active July 18, 2019 09:00
New Computer / Reboot To-Do List

cheatsheet list

Install:

Notepad++
VS Code
Eclipse / STS
Irfanview or other good image viewer
Total Commander

Customize list: