Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@tonidy
tonidy / install.md
Last active September 23, 2024 03:39
Run Deno in .NET Interactive
@tonidy
tonidy / gist:4ac57e4538c78acd38372c367ec0df0e
Created September 14, 2024 11:43
Log after connected to gonb
2024-09-13T17:08:51.9746120Z [00-a1b958cb466a2e7e8ffc1e3887df7429-6b8b98cd6f3067e7-00] [KernelInvocationContext] [KernelInvocationContext] ▶ +[ ⁞Ϲ⁞ SubmitCode #!connect jupyter --help (Token: 2OrVnNbLSO28kad/YNNmMg==, TargetKernelName: csharp, DestinationUri: ) ]
2024-09-13T17:08:51.9750460Z [00-a1b958cb466a2e7e8ffc1e3887df7429-c559b98a211c5d3f-00] [KernelScheduler] [Run] ▶ +[ ⁞Ϲ⁞ DirectiveCommand (Token: 2OrVnNbLSO28kad/YNNmMg==.1, TargetKernelName: csharp, DestinationUri: ) ]
2024-09-13T17:08:51.9751390Z [00-a1b958cb466a2e7e8ffc1e3887df7429-c559b98a211c5d3f-00] ℹ ➡️ DirectiveCommand kernel://pid-77815/ (arrived)
2024-09-13T17:08:51.9751660Z [00-a1b958cb466a2e7e8ffc1e3887df7429-c559b98a211c5d3f-00] ℹ ➡️ DirectiveCommand kernel://pid-77815/csharp (arrived)
2024-09-13T17:08:51.9757320Z [00-a1b958cb466a2e7e8ffc1e3887df7429-c559b98a211c5d3f-00] ℹ ⁞Ε⁞ StandardOutputValueProduced '' (FormattedValues: 'Description: ...' (text/plain)) (ValueId: ) (Command: SubmitCode, Token: 2OrVnNbLSO28kad/YNNmMg==)
20
error[E0277]: the trait bound `AnalysedType: wasm_wave::wasm::WasmType` is not satisfied
--> /Users/toni/.cargo/registry/src/index.crates.io-6f17d22bba15001f/golem-wasm-rpc-0.0.26/src/text.rs:7:17
|
7 | type Type = AnalysedType;
| ^^^^^^^^^^^^ the trait `wasm_wave::wasm::WasmType` is not implemented for `AnalysedType`
|
= help: the following other types implement trait `wasm_wave::wasm::WasmType`:
wasm_wave::value::Type
wasmtime::ValType
wasmtime::component::Type
@tonidy
tonidy / create_authors.sql
Created December 18, 2022 07:31
Library Database
DROP TABLE IF EXISTS `authors`;
CREATE TABLE `authors` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) DEFAULT NULL,
`birthday` date DEFAULT NULL,
`address` text DEFAULT NULL,
`phone_number` char(13) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
address=/.test/127.0.0.1
address=/.dev/127.0.0.1
#listen-address=127.0.0.1
@tonidy
tonidy / 0x0.sh
Created October 22, 2022 09:04 — forked from gingerbeardman/0x0.sh
Simple cli tool to use https://0x0.st for ephemeral file uploads. Install: curl https://gist.githubusercontent.com/gingerbeardman/5398a5feee9fa1e157b827d245678ae3/raw/9ea5c714b41bdef77a8984bc91ff5d248c48d048/0x0.sh | sudo tee /usr/local/bin/0x0.sh && sudo chmod +x /usr/local/bin/0x0.sh
#!/bin/sh
URL="https://0x0.st"
if [ $# -eq 0 ]; then
echo "Usage: 0x0.st FILE\n"
exit 1
fi
FILE=$1
@tonidy
tonidy / bitbucket-pipelines.yml
Created August 2, 2022 08:23 — forked from andsilver/bitbucket-pipelines.yml
Bitbucket pipeline to auto deploy Docker Compose app to Google Kubernetes Engine
pipelines:
branches:
<BRANCH_NAME>:
- step:
services:
- docker
name: Deploy to GKE
deployment: staging
image: google/cloud-sdk:latest
script:
#!/usr/bin/env bash
set -e
set -o pipefail
error() {
echo "ERROR: $@" 1>&2
echo "Exiting installer" 1>&2
exit 1
}
@tonidy
tonidy / split-string-into-rows.sql
Created July 13, 2022 10:35 — forked from duanehutchins/split-string-into-rows.sql
MySQL split comma-separated string into rows
-- split-string-into-rows.sql
-- Duane Hutchins
-- https://www.github.com/duanehutchins
-- Split a string into a mysql resultset of rows
-- This is designed to work with a comma-separated string (csv, SET, array)
-- To use a delimiter other than a comma:
-- Just change all the occurrences of ',' to the new delimiter
-- (four occurrences in SET_EXTRACT and one occurrence in SET_COUNT)
@tonidy
tonidy / ISODate.go
Created May 11, 2022 23:05 — forked from lokeb/ISODate.go
Custom Date type with format YYYY-MM-DD and JSON decoder (Parser) and encoder (Unmarshal and Marshal methods)
//ISODate struct
type ISODate struct {
Format string
time.Time
}
//UnmarshalJSON ISODate method
func (Date *ISODate) UnmarshalJSON(b []byte) error {
var s string
if err := json.Unmarshal(b, &s); err != nil {