Skip to content

Instantly share code, notes, and snippets.

View dastko's full-sized avatar
🎯
Focusing

Davor Stankovic dastko

🎯
Focusing
View GitHub Profile
@dastko
dastko / PRIVACY_POLICY.md
Last active February 10, 2026 22:06
Privacy Policy

Privacy Policy for Hollow Talk

Last updated: February 10, 2026

Hollow Talk ("we", "us", or "our") uses local-only processing to filter AI-generated content from your LinkedIn feed. We are committed to protecting your privacy and transparency.

Data Collection and Usage

We do not collect, store, or transmit any personal data.

@dastko
dastko / test
Created February 22, 2023 10:53
[{"coldStart": true, "secretsLoadingDiff": "2.0195", "getForUser": "0.3794", "findAllDevicesToControl": "0.3218", "getUsersByThingName": "0.2391", "findByThingName": "0.2401"}, {"coldStart": false, "secretsLoadingDiff": "2.0195", "getForUser": "0.2978", "findAllDevicesToControl": "0.4397", "getUsersByThingName": "0.1218", "findByThingName": "0.0771"}, {"coldStart": false, "secretsLoadingDiff": "2.0195", "getForUser": "0.1125", "findAllDevicesToControl": "0.3807", "getUsersByThingName": "0.3195", "findByThingName": "0.1002"}, {"coldStart": false, "secretsLoadingDiff": "2.0195", "getForUser": "0.2232", "findAllDevicesToControl": "0.3203", "getUsersByThingName": "0.1607", "findByThingName": "0.0600"}, {"coldStart": false, "secretsLoadingDiff": "2.0195", "getForUser": "0.1719", "findAllDevicesToControl": "0.1596", "getUsersByThingName": "0.1197", "findByThingName": "0.0600"}, {"coldStart": false, "secretsLoadingDiff": "2.0195", "getForUser": "0.0829", "findAllDevicesToControl": "0.2406", "getUsersByThingName": "0
@dastko
dastko / DeCryptor.java
Created February 24, 2017 23:10 — forked from JosiasSena/DeCryptor.java
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
return findC.where().eq("user_id", userId).findList().get(findC.findRowCount() - 2);
public static Cart findByUserId(int userId){
return findC.where().eq("user_id", userId).findUnique();
}
public static Result showCart(){
email = session("email");
User u = Session.getCurrentUser(ctx());
public static Result showCart(){
email = session("email");
User u = Session.getCurrentUser(ctx());
return ok(cart.render(email, Cart.find(1).cartItems));
}
public static Result addMealToBasket(int id, int cartID){
public static Result registration() throws MalformedURLException {
DynamicForm form = Form.form().bindFromRequest();
String email = form.data().get("email");
String hashedPassword = form.data().get("hashedPassword");
User usr = new User(email, hashedPassword);
Location loc = new Location("", "", "");
usr.location = loc;
loc.save();
usr.confirmationString = UUID.randomUUID().toString();
DynamicForm form = Form.form().bindFromRequest();
String email = form.data().get("email");
String hashedPassword = form.data().get("hashedPassword");
User usr = new User(email, hashedPassword);
Location loc = new Location("", "", "");
usr.confirmationString = UUID.randomUUID().toString();
if (usr.checkIfExists(email) == true) {
flash("inDatabase",
Messages.get("User already exists - please confirm user or login"));
<!DOCTYPE html>
<html>
<head>
<title>SOME TITLE</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./css/bootstrap-theme.min.css">
</head>
<body>
select i.name, min(oi.quantity) from items i
inner join order_items oi on i.id = oi.item_id;
select c.name as Ime, count(o.id) as Ukupno FROM customers c
inner join orders o ON c.id = o.customer_id GROUP BY c.name;
select c.name as Ime, count(oi.item_id) as Ukupno FROM customers c
inner join orders o ON c.id = o.customer_id
inner join order_items oi ON o.id = oi.order_id GROUP BY c.name;