Skip to content

Instantly share code, notes, and snippets.

View bartoszgajda55's full-sized avatar
🎯
Focusing

Bartosz Gajda bartoszgajda55

🎯
Focusing
View GitHub Profile
@bartoszgajda55
bartoszgajda55 / taxietl.scala
Created September 1, 2020 12:57
TaxiETL Spark Job
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
bartoszgajda55 / countevents.component.html
Last active August 17, 2021 15:59
Using Angular and Chart.js to build real-time charts
<mat-card>
<mat-card-title>Number of RSVPs created</mat-card-title>
<mat-card-subtitle
>Counted number of events created, within every 10 second
window</mat-card-subtitle
>
<mat-card-content>
<canvas
baseChart
width="600"
@bartoszgajda55
bartoszgajda55 / default
Last active May 15, 2018 17:21
Nginx config for Angular
##
# 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.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# 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
bartoszgajda55 / IonicDirectiveInComponent.ts
Created February 12, 2018 22:40
How to use Ionic directives in custom component
import { NgModule } from '@angular/core';
import { ActionSheetComponent } from './action-sheet/action-sheet';
import {IonicModule} from "ionic-angular";
@NgModule({
declarations: [ActionSheetComponent],
imports: [
// Add this module and every component that need access to Ionic directives
IonicModule.forRoot(ActionSheetComponent)
],
exports: [ActionSheetComponent]
@bartoszgajda55
bartoszgajda55 / webpush.txt
Last active September 15, 2017 17:11
More about Web Push
https://web-push-book.gauntface.com/
https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/
@bartoszgajda55
bartoszgajda55 / clean_code.md
Created August 22, 2017 18:25 — forked from wojteklu/clean_code.md
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