Skip to content

Instantly share code, notes, and snippets.

@mihairaulea
mihairaulea / schema.json
Created January 25, 2022 17:20
src/api/homepage/content-types/homepage/schema.json
{
"kind": "singleType",
"collectionName": "homepages",
"info": {
"singularName": "homepage",
"pluralName": "homepages",
"displayName": "Homepage",
"description": ""
},
"options": {
<Listing>
<count>154</count>
<Ad_Type>Sale</Ad_Type>
<Unit_Type>Apartment</Unit_Type>
<Unit_Model/>
<Primary_View><![CDATA[CANAL]]></Primary_View>
<permit_number>7118374900</permit_number>
<Property_Ref_No>DP-S-39780</Property_Ref_No>
<Unit_Builtup_Area>2026</Unit_Builtup_Area>
@mihairaulea
mihairaulea / outline.spec.js
Created October 1, 2021 14:57
Contract outline
// turn this into a blueprint with tests and publish it on github
let openSpurAccount=0;
let accountBalances[];
let openSpurCut = 5%;
function setupAccount(githubId) {
verifyRequesterIsOwner(githubId);
accountBalances[githubId] = 0;
}
https://infinite-lowlands-19198.herokuapp.com/data?orderData={"100100":{"productIds":["Metro_RECH_1_100100","A2201","A2212","A2212","A2212","A2212","A2212","A2212","A2212","A2233","A2233","A2233","A2233","Metro_RECH_1_100100"],"productNames":["INCEPE","FP-40SIGMA","TB-96956","TB-96953","TB-96952","TB-96950","TB-96955","TB-96949","TB-96948","DP-11GSIGA","DP-11GSIGG","DP-11GSIGN","DP-11GSIGR","TERMINAT"],"quantitiesPieces":["Catalin22","4200","21","25","65","20","65","48","45","40","360","400","360","Catalin"],"quantityBoxes":["CUTII","X","X","X","X","X","X","X","X","X","X","X","X","END"],"quantityPallets":["DESCRIERE","Folii_40mic__SIGMA","PANOU_120X90__SIGM","PANOU_40X30__SIGMA","PANOU_60X40__SIGMA","PANOU_60X40__SIGMA","PANOU_60X90__SIGMA","TABLA_60X40__SIGMA","TABLA_90X60__SIGMA","DOSAR_ALBAS__SIGMA","DOSAR_GALBE__SIGMA","DOSAR_NEGRU__SIGMA","DOSAR_ROSU__SIGMA","END"],"comments":["unprimcomentariu22"," EDITHERE"]},"200200":{"productIds":["Metro_RECH_2_200200","A2242","M0211","M0213","M0221","M0423","M0431",
@mihairaulea
mihairaulea / Microcontroller.ino
Created October 5, 2020 12:56
Arduino microcontroller
#include <ArduinoWebsockets.h>
#include <WiFi.h>
#include <ArduinoJson.h>
#include <stdint.h>
#include <TLC591x.h>
/*
*
*
segments.print_vertical_lines(); ---------------------------------------- before anything happens
segments.
<htmL>
<head>
<script>
let microId = uuidv4();
let state = {};
function connectToWebsocket() {
let socket = new WebSocket("ws://localhost:8081");
socket.onopen = function(e) {
console.log("[open] Connection established");
// https://github.com/quartz-scheduler/quartz/blob/master/docs/quick-start-guide.adoc#starting-a-sample-application
// https://firebase.google.com/docs/firestore/server/samples-java
public class JobScheduler {
public static void main(String[] args) {
// define the job and tie it to our custom class
JobDetail job = newJob(DashboardDataPusher.class)
.withIdentity("job1", "group1")
.build();
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=59816:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit-rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit5-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Jav
@mihairaulea
mihairaulea / etherbase
Created October 17, 2017 11:32
etherbase
0x54FF3a21Ba0932EC6dC987efe63131B616B88193
@mihairaulea
mihairaulea / GDBSessionFactory.java
Created January 10, 2017 14:05
session factory used with the ogm
package com.test;
import org.neo4j.ogm.session.Session;
import org.neo4j.ogm.session.SessionFactory;
public class GDBSessionFactory {
private static final String BOLT_URI = "bolt://xxxx:xxxx@127.0.0.1:7687";
private static final String BOLT_ENCRYPTION = "REQUIRES";
private static SessionFactory sessionFactory = new SessionFactory(configuration(),