Skip to content

Instantly share code, notes, and snippets.

View alex88's full-sized avatar

Alessandro Tagliapietra alex88

View GitHub Profile
@alex88
alex88 / mysql_ramdisk.rb
Created July 19, 2013 13:03
Creates a ramdisk on osx and runs a mysql instance using pre-installed homebrew percona or mysql server Use directly to create, with 'shutdown' argument to tear off the mysql and the disk To connect use -h 127.0.0.1 -P3307
#!/usr/bin/env ruby
shutdown = false
cnf_path = '/usr/local/etc/my_ramdisk.cnf'
ramdisk_path = '/Volumes/RAMDisk'
loop { case ARGV[0]
when 'shutdown' then ARGV.shift; shutdown = true
else break
end; }
@alex88
alex88 / PostgreSqlWithJsonDatabaseDialect.kt
Created March 12, 2022 00:44 — forked from mtraynham/PostgreSqlWithJsonDatabaseDialect.kt
Kafka Connect Postgres JSONB Dialect (Kafka 2.2.0)
package com.project.kafka.connect.jdbc.dialect
import com.project.kafka.connect.utils.JsonUtils
import io.confluent.connect.jdbc.dialect.DatabaseDialect
import io.confluent.connect.jdbc.dialect.DatabaseDialectProvider
import io.confluent.connect.jdbc.dialect.PostgreSqlDatabaseDialect
import io.confluent.connect.jdbc.sink.metadata.SinkRecordField
import java.sql.PreparedStatement
import org.apache.kafka.common.config.AbstractConfig
import org.apache.kafka.connect.data.Schema

Keybase proof

I hereby claim:

  • I am alex88 on github.
  • I am alex88 (https://keybase.io/alex88) on keybase.
  • I have a public key ASAn5RwKkVAWs6QH1LUageUbP0DoqMdAHNSg3Qs6ZNdjtQo

To claim this, I am signing this object:

<?php
namespace Acme\DemoBundle\Annotation;
/**
* The Annotation class
*
* @Annotation
*/
class RequestJsonDecoder
@alex88
alex88 / services.yml
Created July 4, 2013 13:58
Add useful informations to logs
services:
monolog.processor.session_request:
class: Acme\CoreBundle\Service\sessionRequestProcessor
arguments: [ @session, @service_container, @kernel ]
tags:
- { name: monolog.processor, method: processRecord }