Skip to content

Instantly share code, notes, and snippets.

View anurbol's full-sized avatar
:octocat:

Nurbol Alpysbayev anurbol

:octocat:
View GitHub Profile
@devmobasa
devmobasa / typescript-intersection-type-simple.ts
Created March 28, 2017 05:39
TypeScript - intersection types simple example
interface IStudent {
id: string;
age: number;
}
interface IWorker {
companyId: string;
}
type A = IStudent & IWorker;
@tamlyn
tamlyn / README.md
Last active July 7, 2022 09:48
Execution order of Jest/Jasmine test code

Execution order of Jest/Jasmine test code

While tests run in source order, surrounding code does not which can lead to hard to debug issues.

Compare the test file below with the sample output below that and note the order of the log messages.

Key points

  • Any code not inside of it, beforeAll, afterAll, beforeEach or afterEach runs immediately on initialisation.
  • This means code at the end of your file runs before even your before hooks.
@m4grio
m4grio / Blueprint.php
Last active June 14, 2019 06:45
Extending Laravel 5 Blueprint for MySqlConnection
<?php
namespace App\Database\Schema;
use Illuminate\Database\Schema\Blueprint as ParentBlueprint;
use Illuminate\Support\Facades\DB;
/**
* Class Blueprint
*
/*
* Utility "class" extending Array with lookup functions
*
* Can do everything an Array can, including indexing by brackets,
* use in loop constructions (for, while), etc
*
* Example:
* var foo = new Foo({id : 1})
* foo.getId() === 1; // => true
* var c = new Collection();
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing