Skip to content

Instantly share code, notes, and snippets.

View otobrglez's full-sized avatar
🏗️
Building.

Oto Brglez otobrglez

🏗️
Building.
View GitHub Profile
// Live is to short to not have fun.
// Oto Brglez
// @otobrglez
object Main extends App {
type `🐰` = String
type `👨‍💼` = `🐰`
type `💯` = Int
val (`n🆕`: `🐰`, `s👽`: `🐰`) = ("\n", " ")
val `👋`: (`👨‍💼`, `🐰`) => `🐰` = { (`👶`, `🐇`) =>
class WebHookNode
has_many: :web_hook_expressions
has_many: :expression, thought: :web_hook_expressions
has_many :query_parameters, type: ....
has_many :body_parameters, type: ....
has_many :header_parameters, type: ...
end
package com.opalab.experimental
import java.io.File
import cats.data.NonEmptyChain
import cats.implicits._
import io.circe.syntax._
import scala.io.Source
import scala.util.Using
@otobrglez
otobrglez / NodeApp.scala
Last active July 9, 2020 22:18
Simple Akka Cluster with decline and Akka Typed.
/**
* Author: Oto Brglez - <otobrglez@gmail.com>
*/
package com.pinkstack.realestate.clustering4
import akka.actor.typed._
import akka.actor.typed.scaladsl._
import akka.cluster.ClusterEvent.MemberEvent
import akka.cluster.typed._
import com.monovore.decline._
@otobrglez
otobrglez / Boot5.scala
Created November 7, 2019 13:03
Odd Slick streams
package com.examples.streaming_one
import akka.Done
import akka.actor.ActorSystem
import akka.stream._
import akka.stream.scaladsl._
import slick.jdbc.JdbcBackend.Database
import slick.jdbc.PostgresProfile.api._
import slick.jdbc.{ResultSetConcurrency, ResultSetType}
@otobrglez
otobrglez / pg_optimisation.sql
Last active March 28, 2018 13:39
Optimising N+1 problem in PG with "json_agg"
WITH question_options_f AS
( SELECT id,
question_id,
name,
fixed,
nota,
name_html,
name_raw
FROM question_options
WHERE deleted_at IS NULL
@otobrglez
otobrglez / data.yml
Created March 21, 2018 16:37
Transforming yaml to another yaml.
header:
label: 'Header'
breakpoint:
fallback:
name: header_fallback
label: 'Header @ fallback (306 x 172)'
width: 306
height: 172
small:
name: header_small
@otobrglez
otobrglez / spam.txt
Created December 5, 2017 12:32
Slovenia SPAM
Pozdrav!
Ne pomnem, da bi kadarkoli dal dovoljenje za uporabo mojega maila v komercialne namene.
S pošiljanjem tovrstnih sporočil brez mojega soglasja kršite ZEKom-UPB1, ZVPot-UPD2, ZEPT in ZVOP-1.
http://www.arnes.si/pomoc-uporabnikom/varnostna-priporocila/nezelena-elektronska-posta-spam/zakonodaja.html
Ob naslednjem sporočilu vas prijavim na:
1) Agencijo za komunikacijska omrežja in storitve (info.box@akos-rs.si)
@otobrglez
otobrglez / sync.sh
Last active October 19, 2017 13:23
Bash script for syncing WordPress theme to FlyWheel (sftp with lftp)
#!/usr/bin/env bash
# Oto Brglez - <otobrglez@gmail.com>
set -e
# Set path where your theme lives on server.
THEME_DIRECTORY=/org-myorg/site/wp-content/themes/some-theme
lftp -u $FLYWHEEL_USER,$FLYWHEEL_PASS sftp://sftp.flywheelsites.com << --EOF--
set sftp:auto-confirm yes
set ssl:verify-certificate false
@otobrglez
otobrglez / REPORT.md
Created May 19, 2017 12:28
arp-scan / arp-fingerprint "bomb"

Problem && how to replicate?

  1. Najprej arp-scan
sudo arp-scan -r 3 -b 2 --localnet --ouifile=data/nmap-mac-prefixes.txt

Output: