George Opritescu

Developer from somewhere

convert dot file to png

Problem: have a dot file I’d like to view as a png.

Solution: found here

  • install graphviz
brew install graphviz
  • generate png:
dot -Tpng -o DocName.png
Read More

kotlin data class spring default constructor

Problem: data class generated by kotlin does not have a no arg constructor.

Solution: Solution found here. Add kotlin-noarg to build.gradle ( change if using other versions, more lines than needed are shown for context ) :

buildscript {
    ext {
        kotlinVersion = '1.1.4-3'
        springBootVersion = '2.0.0.M3'
    repositories {
        maven { url "" }
        maven { url "" }
    dependencies {


apply plugin: "kotlin-jpa"
Read More

linx #16

Interesting links:

Read More

linx #15

Interesting links:

  • gops - A tool to list and diagnose Go processes currently running on your system
Read More

osx capture output of running process

Problem: want to capture output of an already running process

Solution: found here

capture() {
    sudo dtrace -p "$1" -qn '
        /pid == $target && arg0 == 1/ {
            printf("%s", copyinstr(arg1, arg2));

after, run:

  • save above code in
  • source
  • capture PID
Read More

facebook flow comment types

Problem: you want to add flow, but you don’t want to complicate your build process.

Solution: use comment types.

const myInt /*: number */ = 10;
const someFnc = (param /*: number */) => {
  // do something
Read More

python SimpleHTTPServer ssl

Problem: wanted to serve some assets over https using SimpleHTTPServer.

Solution: used info from here and here

  • following snippet combines both of those links:
import BaseHTTPServer, SimpleHTTPServer
import ssl

httpd = BaseHTTPServer.HTTPServer(('localhost', 8090), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='~/ssl/server.crt', 
  keyfile='~/ssl/server.key', server_side=True)
Read More

spring kotlin Your ApplicationContext is unlikely to start

Problem: started a kotlin spring app. Received this message: Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package. Problem is described here as well.


  • move files out of the default package, to a named one.
Read More

find program using port

Problem: find which process is using a specific port.

Solution: found here

lsof -i :8080 | grep LISTEN
Read More

add hours to a datetime object

Problem: want to add hours to a datetime object

Solution: use timedelta

from datetime import datetime, timedelta
print + timedelta(hours=5)
Read More