Skip to content

Instantly share code, notes, and snippets.

View levlaz's full-sized avatar

Lev Lazinskiy levlaz

View GitHub Profile
@levlaz
levlaz / ad.txt
Created June 17, 2025 18:58
Available Env Vars in Azure Devops
2025-06-17T18:55:14.0144492Z ##[section]Starting: CmdLine
2025-06-17T18:55:14.0156126Z ==============================================================================
2025-06-17T18:55:14.0156509Z Task : Command line
2025-06-17T18:55:14.0156897Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2025-06-17T18:55:14.0157241Z Version : 2.250.1
2025-06-17T18:55:14.0157423Z Author : Microsoft Corporation
2025-06-17T18:55:14.0157635Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2025-06-17T18:55:14.0157943Z ==============================================================================
2025-06-17T18:55:14.3277015Z Generating script.
2025-06-17T18:55:14.3285983Z Script contents:
@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").
@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 / main.go
Created October 10, 2023 14:54
Dagger + Hugo
package main
import (
"context"
"fmt"
"os"
"path/filepath"
"dagger.io/dagger"
)
```
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 / 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>
@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 / main.java
Created July 24, 2019 23:52
Java Relay Snippet
import com.launchdarkly.client.LDClient;
import com.launchdarkly.client.LDConfig;
import com.launchdarkly.client.LDUser;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import static java.util.Collections.singletonList;
@levlaz
levlaz / ubuntu.md
Last active July 11, 2019 02:51
Ubuntu Init Notes

Add New User

adduser $USERNAME

Make vim default editor

sudo update-alternatives --config editor
@levlaz
levlaz / vscode.md
Created July 2, 2019 02:36
VS Code Config Notes

Add vertical ruler

This is helpful to see when you are about to go over 80 characters.

In settings.json

{
    "editor.rulers": [80]
}