Skip to content

Instantly share code, notes, and snippets.

View cmota's full-sized avatar

Carlos Mota cmota

View GitHub Profile
[{
"name": "Google I/O",
"city": "Mountain View, CA",
"country": "USA",
"date": "2021-05-18",
"logo": "https://events.google.com/io/assets/io_social_asset.jpg",
"website": "https://events.google.com/io/",
"status": "online"
}, {
[{
"name": "Mobiconf",
"city": "Krakow",
"country": "Poland",
"date": "2020-10-01",
"logo": "https://papercallio-production.s3.amazonaws.com/uploads/event/logo/2314/900x400.png",
"website": "https://2020.mobiconf.org/",
"status": "canceled"
}, {
[{
"name": "Mobiconf",
"city": "Krakow",
"country": "Poland",
"date": "2020-10-01",
"logo": "https://papercallio-production.s3.amazonaws.com/uploads/event/logo/2314/900x400.png",
"website": "https://2020.mobiconf.org/",
"status": "canceled"
}, {
@cmota
cmota / AndroidManifest.xml
Created July 20, 2020 12:07
AndroidManifest with hasFragileUserData attribute. Full project on cmota/Playground/FragileData
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:hasFragileUserData="true"
tools:targetApi="q">
...
override fun process(p0: MutableSet<out TypeElement>?, roundEnv: RoundEnvironment?): Boolean {
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "Hello\r\n")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "This is one message\r\n")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "This is another message\r\n")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "And yet another\r\n")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "Well you got the point\r\n")
return true
}
override fun process(p0: MutableSet<out TypeElement>?, roundEnv: RoundEnvironment?): Boolean {
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "Hello")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "This is one message")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "This is another message")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "And yet another")
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "Well you got the point")
return true
}
class GenerateProcessor : AbstractProcessor() {
override fun process(p0: MutableSet<out TypeElement>?, roundEnv: RoundEnvironment?): Boolean {
processingEnv.messager.printMessage(Diagnostic.Kind.NOTE, "Hello")
return true
}
}
@cmota
cmota / temp.xml
Last active February 24, 2020 18:23
<?xml version="1.0" encoding="UTF-8"?>
<response>
<Network CountiesNumber="1" ContactsNumber="7" LinesNumber="23" StopsNumber="501" ZonesNumber="298">
<Counties>
<County Latitude="40.6405055" Longitude="-8.6537539" Id="1" Name="AVEIRO">
<Districts Latitude="40.6405055" Longitude="-8.6537539" Id="5" Name="AVEIRO">
<Parishes Id="64" Name="ARADAS" Latitude="40.6189697" Longitude="-8.6427851" />
<Parishes Id="65" Name="CACIA" Latitude="40.6836396" Longitude="-8.5965662" />
<Parishes Id="66" Name="EIROL" Latitude="40.6105859" Longitude="-8.5359908" />
<Parishes Id="67" Name="EIXO" Latitude="40.6256059" Longitude="-8.5666077" />
{"speakers":
[{
"speaker": "Roland Kuhn",
"company": "ACTYX",
"title": "CTO & co-founder",
"bio": "I am CTO and co-founder of Actyx, author of Reactive Design Patterns, a co-author of the Reactive Manifesto, teacher of the edX course Programming Reactive Systems, and a passionate open-source hakker. Previously I led the Akka project at Lightbend. I also hold a Dr. rer. nat. in particle physics from TU München and have worked in the space industry for several years. I spend most of my life in the central European timezone.",
"talk_title": "What if you need reliability comparable to paper?",
"talk_description":"In the manufacturing industry downtime is very expensive, therefore most small and midsize factories are still managed using paper-based processes. The problem space is perfectly suited for the microservices approach: well-defined and locally encapsulated responsibilities, collaboration and loose coupling between different links in the chain, rapid evolution of individual pieces for the purpo
[{
"question": "A flashing red traffic light signifies that a driver should do what?",
"A": "stop",
"B": "speed up",
"C": "proceed with caution",
"D": "honk the horn",
"answer": "A"
}, {
"question": "A knish is traditionally stuffed with what filling?",
"A": "potato",