Skip to content

Instantly share code, notes, and snippets.

View cmnstmntmn's full-sized avatar
🐕

Constantin Angheloiu cmnstmntmn

🐕
View GitHub Profile
@cmnstmntmn
cmnstmntmn / root.tsx
Last active January 8, 2025 11:41
Qwick initial theme + a hook to be used inside Qwick components
import { component$, useServerData } from "@builder.io/qwik";
import { isDev } from "@builder.io/qwik/build";
import {
QwikCityProvider,
RouterOutlet,
ServiceWorkerRegister,
} from "@builder.io/qwik-city";
import { RouterHead } from "~/components/router-head/router-head";
import setInitialThemeAsString from "~/utils/set-initial-theme?raw";
@cmnstmntmn
cmnstmntmn / component.tsx
Last active December 8, 2024 15:51
qwik server actions
import { component$, Resource, useResource$ } from "@builder.io/qwik";
import { serverGreeter } from "~/server/actions/public";
import { getGreeting } from "~/server/actions/protected";
export const Header = component$(() => {
const userDataResource = useResource$(
async () => await getGreeting({ name: "Pif" }),
);
return (
@cmnstmntmn
cmnstmntmn / webscrapper.txt
Created November 15, 2023 10:37
Scrapemap
Sitemaps
Sitemap netskope
Create new sitemap
{"_id":"netskope","startUrl":["https://community.netskope.com/t5/forums/recentpostspage/post-type/thread/interaction-style/forum"],"selectors":[{"id":"title","multiple":false,"parentSelectors":["pagination"],"regex":"","selector":".lia-message-view-wrapper a.page-link","type":"SelectorText"},{"id":"category","multiple":false,"parentSelectors":["pagination"],"regex":"","selector":".lia-component-common-widget-link","type":"SelectorText"},{"id":"pagination","paginationType":"auto","parentSelectors":["_root","pagination"],"selector":".lia-paging-full-pages li a","type":"SelectorPagination"},{"id":"entry","multiple":true,"parentSelectors":["pagination"],"regex":"","selector":".lia-message-view-wrapper","type":"SelectorText"}]}
// -- definim aplicatia si o montam la id-ul #app vezi .html
const root = ReactDOM.createRoot(app)
// -- definim componenta App (entrypoint-ul aplicatiei)
const App = () => {
// -- definim state-ul aplicatiei
const [state, setState] = React.useState({
user: null,
cart: [],
products: [
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cmnstmntmn
cmnstmntmn / custom_datasource.php
Last active April 16, 2020 21:42
custom_datasource.php
public static function prepareGateway(&$gateway)
{
$user = [
"user" => [
"email" => "email",
"password" => "pass"
]
];
import {
Button,
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
View,
} from 'react-native';
import {

VerneConfig

allow_anonymous = on
listener.ws.default = 127.0.0.1:8080
listener.ws.proxy_protocol = on

Nginx

> [email protected] build /Users/constantin/experiments/BoilerWebApp
> node scripts/build
{ Error
at Function.missingTransform (/Users/constantin/experiments/BoilerWebApp/node_modules/buble/dist/buble.cjs.js:376:9)
at Node.initialise (/Users/constantin/experiments/BoilerWebApp/node_modules/buble/dist/buble.cjs.js:3619:17)
at Node.initialise (/Users/constantin/experiments/BoilerWebApp/node_modules/buble/dist/buble.cjs.js:102:11)
at Node.initialise (/Users/constantin/experiments/BoilerWebApp/node_modules/buble/dist/buble.cjs.js:3446:9)
at value.forEach.node (/Users/constantin/experiments/BoilerWebApp/node_modules/buble/dist/buble.cjs.js:100:40)
at Array.forEach (<anonymous>)