Skip to content

Instantly share code, notes, and snippets.

View infomiho's full-sized avatar
🐶

Mihovil Ilakovac infomiho

🐶
View GitHub Profile
@infomiho
infomiho / FuzzyFilePath.sublime-settings
Last active January 26, 2017 11:35
FuzzyFIlePath settings for vuejs
{
"scopes": [
{
// js and vue - require("")
"scope": "source\\.[js|vue].*string", // 1. ignore if scope at cursor does not match expression (super+alt+p)
"prefix": ["require"], // 2. trigger only if: require(<cursor>
// if 1 & 2 are true:
"auto": true, // auto suggest filepaths, else only by shorctut
"extensions": ["js", "vue"], // show only .js and .vue files
"relative": true, // insert absolute
@infomiho
infomiho / Učitelj funkcija 2000.markdown
Created November 26, 2015 20:34
Učitelj funkcija 2000
@infomiho
infomiho / esnextbin.md
Created February 5, 2016 17:55
esnextbin sketch
@infomiho
infomiho / Main.css
Created September 2, 2023 21:46
Wasp + DaisyUI setup
@tailwind base;
@tailwind components;
@tailwind utilities;
@infomiho
infomiho / 0-intro.md
Last active September 22, 2023 09:02
Running Wasp on UBI9

We will go through the needed steps to deploy Wasp on a single UBI9 image.

The How

Building is done with the build.sh file:

  1. wasp build on the user's computer
  2. Building the client app
  3. Overriding the default Dockerfile
@infomiho
infomiho / 0-README.md
Last active September 22, 2023 09:54
Red Hat UBI9 Wasp Deployment

Building Wasp for Red Hat's UBI9 image can be done with a custom Docker file and with a few simple steps that we encoded in the build.sh script.

Just put both the build.sh script and the Dockerfile at the root of your Wasp project. Make sure to make the build.sh executable with chmod +x build.sh.

There is also a test.sh script that builds the Docker image and runs it (to make sure it works)

@infomiho
infomiho / client-MainPage.jsx
Last active October 5, 2023 07:19
Using Namespaces with Wasp WebSocket
import { useEffect } from "react";
import "./Main.css";
import { useMessagesSocket, useSocketListener } from "./websockets";
const MainPage = () => {
const { socket, isConnected } = useMessagesSocket();
useSocketListener(socket, "chatMessage", (message) => {
console.log("message received: ", message);
});
@infomiho
infomiho / 0-Deploy-Wasp-to-Caprover.md
Last active November 11, 2023 23:06
Deploying Wasp apps to Caprover

Caprover

You'll need a Caprover server setup.

Then create three apps for your Wasp app:

  1. server
  2. client
  3. Postgres DB
    • go to one click apps/dbs and create a vanilla PostgreSQL
@infomiho
infomiho / main.wasp
Last active March 14, 2024 22:05
Uploading files with Wasp 0.12.3
app fileUpload {
wasp: {
version: "^0.12.3"
},
title: "file-upload",
}
route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import { MainPage } from "@src/MainPage.jsx"
@infomiho
infomiho / main.wasp
Created March 8, 2024 19:35
Wasp with Radix UI
app radixui {
wasp: {
version: "^0.12.3"
},
title: "radixui",
client: {
rootComponent: import { Layout } from "@src/Layout",
}
}