Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Bartosz Gajda bartoszgajda55

🎯
Focusing
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
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>
<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
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.
# 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 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";
@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 Sep 15, 2017
More about Web Push
View webpush.txt
https://web-push-book.gauntface.com/
https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/
@bartoszgajda55
bartoszgajda55 / clean_code.md
Created Aug 22, 2017 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

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