Skip to content

Instantly share code, notes, and snippets.

View levlaz's full-sized avatar

Lev Lazinskiy levlaz

View GitHub Profile
@levlaz
levlaz / conf.yml
Last active August 3, 2021 02:41
Nonsense logs with PII
logs:
- type: file
path: "tmp/sample_logger.log"
service: "nf"
@levlaz
levlaz / app.js
Last active May 26, 2021 01:25
React Hook Demo with Form Handling
import { Route, Switch } from 'react-router-dom';
import HooksDemo from './hooksDemo';
import React from 'react';
import { withLDProvider } from 'launchdarkly-react-client-sdk';
const App = () => (
<div>
<main>
<Switch>
```
Caught panic:
runtime error: slice bounds out of range [7:5]
Restoring terminal...
goroutine 1 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
@levlaz
levlaz / main.go
Created October 10, 2023 14:54
Dagger + Hugo
package main
import (
"context"
"fmt"
"os"
"path/filepath"
"dagger.io/dagger"
)
@levlaz
levlaz / main.go
Created January 9, 2024 15:13
Direct Call
package main
import (
"log"
"os"
"os/exec"
)
func main() {
cmd := exec.Command("dagger", "call", "-m", "github.com/shykes/daggerverse/hello", "message")
@levlaz
levlaz / test.py
Last active October 8, 2024 17:57
Testing wtih dagger/dagger
@function
async def text_examples(self, source: dagger.Directory) -> str:
output = ""
for language in ["python", "typescript", "go", "shell"]:
output += await (
dag.
dagger_dev().
dev().
with_mounted_directory("/src", source).
with_workdir("/src").