Skip to content

Instantly share code, notes, and snippets.


Bartosz Gajda bartoszgajda55

View GitHub Profile
View taxietl.scala
package playground
import org.apache.spark.sql.{SaveMode, SparkSession}
import org.apache.spark.sql.functions._
object TaxiETL {
def main(args: Array[String]): Unit = {
if(args.length != 2) { // prod version only
println("Need two arguments: 1) input data path 2) output data path")
bartoszgajda55 / countevents.component.html
Last active Aug 17, 2021
Using Angular and Chart.js to build real-time charts
View countevents.component.html
<mat-card-title>Number of RSVPs created</mat-card-title>
>Counted number of events created, within every 10 second
bartoszgajda55 / default
Last active May 15, 2018
Nginx config for Angular
View default
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
bartoszgajda55 / IonicDirectiveInComponent.ts
Created Feb 12, 2018
How to use Ionic directives in custom component
View IonicDirectiveInComponent.ts
import { NgModule } from '@angular/core';
import { ActionSheetComponent } from './action-sheet/action-sheet';
import {IonicModule} from "ionic-angular";
declarations: [ActionSheetComponent],
imports: [
// Add this module and every component that need access to Ionic directives
exports: [ActionSheetComponent]
bartoszgajda55 / webpush.txt
Last active Sep 15, 2017
More about Web Push
View webpush.txt
bartoszgajda55 /
Created Aug 22, 2017 — forked from wojteklu/
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.

General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules