Skip to content

Instantly share code, notes, and snippets.

View lukaspili's full-sized avatar

Lukasz Piliszczuk lukaspili

View GitHub Profile
@lukaspili
lukaspili / creatives.json
Created May 8, 2025 16:22
Output creatives
This file has been truncated, but you can view the full file.
{
"dateRange": "last_90d",
"creativeInsights": [
{
"fileUrl": "https://motionaccountassets.blob.core.windows.net/63e47dd02993ee721a2a5e5e/creativeassetfacebook/6748b9613ae47f475e2de8d7/video.mp4",
"summary": "**Ad description:** This is a sponsored video ad for Bleuet bras on social media platforms. The ad is promoting the Bleuet brand and their bras, specifically for tweens. It uses a personal story and relatable challenges to demonstrate the value of the product and its key features. \n\n**Brand description:** Bleuet is a brand that specializes in bras for tweens. They are trying to position themselves as a brand that understands the challenges of growing girls and offers products that are comfortable and stylish. The ad also portrays Bleuet as a brand that is confident and trustworthy, and offers quality products.\n\n**Product description:** The product featured in the ad is a Bleuet bra. It is a soft, comfortable bra designed for tweens. The ad highlights its key features, including: \
@lukaspili
lukaspili / AvatarForm.tsx
Created April 28, 2025 15:38
filepond react
"use client";
import { removeUserAvatar, updateUserAvatar } from "@/actions/session/avatar";
import { Text } from "@/catalyst/text";
import { AvatarInput, AvatarInputController } from "@/components/account/avatar/AvatarInput";
import { ActionButton } from "@/components/shared/ActionButton";
import { ApiResponse } from "@/lib/api";
import { SessionUser } from "@/models/user";
import { valibotResolver } from "@hookform/resolvers/valibot";
import { Button } from "catalyst/button";
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Blucare Widget Example</title>
<style type="text/css">
html,
@lukaspili
lukaspili / api.ts
Last active October 13, 2022 19:28
const fetcher = async ({ path, method = "get", query, body }: FetcherPayload) => {
let url = `${process.env.NEXT_PUBLIC_API_URL}/${path}`;
if (query != undefined) {
url += `?${new URLSearchParams(query)}`;
}
console.log(`[api] ${method} ${url}`);
const token = Cookies.get("token");
let response: Response;
/**
* --------------------------------------------------------------------------------
* NoiseTube Mobile client (Java implementation; Android version)
* <p>
* Copyright (C) 2008-2010 SONY Computer Science Laboratory Paris
* Portions contributed by Vrije Universiteit Brussel (BrusSense team), 2008-2011
* Android port by Vrije Universiteit Brussel (BrusSense team), 2010-2011
* --------------------------------------------------------------------------------
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License, version 2.1, as published
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
import "@openzeppelin/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/access/Ownable.sol";
import "@openzeppelin/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/utils/Strings.sol";
import "@openzeppelin/token/ERC721/IERC721Receiver.sol";
import "./util/Test.t.sol";
-- insert a new place and associated hours
create function app_public.save_place(
city_id text,
address text,
latitude double precision,
longitude double precision,
hours tsrange[],
phone app_public.phone_number default null,
) returns app_public.places as $$
@lukaspili
lukaspili / apple-app-site-association
Last active May 12, 2022 18:16
iOS and Android deep link configuration
{
"applinks": {
"apps": [],
"details": [
{
"appID": "NN3HD78L8S.app.otsukalab",
"paths": [
"*"
]
},
import 'dart:io';
import 'package:esc_pos_printer/esc_pos_printer.dart';
import 'package:esc_pos_utils/esc_pos_utils.dart';
import 'package:flutter/services.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:image/image.dart' as image;
import 'package:mimosushi_forecast/data/data.dart';
import 'package:mimosushi_forecast/presentation/presentation.dart';
require 'google/apis/androidpublisher_v3'
class IapService
def self.validate_receipt(source:, sku:, transaction_id:, transaction_receipt:)
if source == :appstore
validate_appstore(
source: source,
sku: sku,
transaction_id: transaction_id,