This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package plugins | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"os" | |
"strconv" | |
sqlite_vec "github.com/asg017/sqlite-vec-go-bindings/cgo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package plugins | |
import ( | |
"fmt" | |
"strings" | |
"github.com/labstack/echo/v5" | |
"github.com/pocketbase/dbx" | |
"github.com/pocketbase/pocketbase" | |
"github.com/pocketbase/pocketbase/apis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:boolean_selector/boolean_selector.dart'; | |
void main() { | |
final vars = Vars('(x && y) || z', { | |
'x': true, | |
'y': false, | |
'z': true, | |
})(); | |
print('result: $vars'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:typed_data'; | |
import 'package:drift/drift.dart'; | |
import 'package:google_generative_ai/google_generative_ai.dart'; | |
import 'connection/connection.dart' as impl; | |
part 'database.g.dart'; | |
@DriftDatabase(include: {'sql.drift'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/widgets.dart'; | |
import 'package:flutter/material.dart' | |
show MaterialApp, Material, Colors, TextButton; | |
import 'package:signals/signals_flutter.dart'; | |
class TabsController { | |
/// Current tab signal | |
final currentTab = signal<Tab?>(null); | |
/// List of tabs signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Posts</title> | |
<script src="https://unpkg.com/htmx.org@1.4.1"></script> | |
<script src="https://unpkg.com/htmx.org@1.4.1/dist/ext/client-side-templates.js"></script> | |
<script src="https://unpkg.com/mustache@latest"></script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:signals/signals_flutter.dart'; | |
void main() { | |
runApp(const App()); | |
} | |
class App extends StatelessWidget { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:signals/signals_flutter.dart'; | |
void main() { | |
runApp(const App()); | |
} | |
class App extends StatelessWidget { | |
const App({super.key}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
const defaultIdLength = 15; | |
const defaultIdAlphabet = "abcdefghijklmnopqrstuvwxyz0123456789"; | |
String pseudorandomStringWithAlphabet(int length, String alphabet) { | |
final List<int> b = List.filled(length, 0); | |
final int max = alphabet.length; | |
for (int i = 0; i < length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
void main() { | |
final file = File('lib/hello.dsx'); | |
final out = File('lib/hello.g.dart'); | |
out.createSync(); | |
out.writeAsStringSync(convert(file.readAsStringSync())); | |
} | |
String convert(String raw) { |
NewerOlder