Skip to content

Instantly share code, notes, and snippets.

View jonathanpv's full-sized avatar
:atom:
coding a better world

Jonathan Padilla jonathanpv

:atom:
coding a better world
  • sf
View GitHub Profile
@jonathanpv
jonathanpv / cargo build output.txt
Created March 22, 2023 22:18
cargo build windows output
PS C:\Users\Administrator\Documents\vector> cargo build
Compiling krb5-src v0.3.2+1.19.2
Compiling heim-common v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
Compiling tokio-openssl v0.6.3
Compiling memoffset v0.7.1
Compiling heim-runtime v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
Compiling raw-cpuid v10.6.0
Compiling tracing-log v0.1.3
Compiling sharded-slab v0.1.4
Compiling itertools v0.10.5
@jonathanpv
jonathanpv / err.txt
Created March 22, 2023 22:02
err rust analyzer vector windwos
[ERROR project_model::workspace] cyclic deps: vector_config_macros(CrateId(815)) -> vector_config(CrateId(812)), alternative path: vector_config(CrateId(812)) -> vector_config_macros(CrateId(815))
[ERROR project_model::workspace] cyclic deps: vrl_stdlib(CrateId(833)) -> vrl(CrateId(823)), alternative path: vrl(CrateId(823)) -> vrl_stdlib(CrateId(833))
[ERROR project_model::workspace] cyclic deps: vrl_stdlib(CrateId(833)) -> vrl(CrateId(823)), alternative path: vrl(CrateId(823)) -> vrl_stdlib(CrateId(833))
[ERROR rust_analyzer::main_loop] FetchBuildDataError:
error: failed to run custom build command for `krb5-src v0.3.2+1.19.2`
Caused by:
process didn't exit successfully: `c:\Users\Administrator\Documents\vector\target\debug\build\krb5-src-8a24d94e425c8eec\build-script-build` (exit code: 101)
--- stdout
@jonathanpv
jonathanpv / Calc.java
Created March 11, 2023 01:10
da real answer
package hw4;
import java.util.Scanner;
import exceptions.EmptyException;
public class Calc {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
LinkedStack<Integer> stack = new LinkedStack<>();
@jonathanpv
jonathanpv / Calc.java
Created March 11, 2023 00:47
rpn calc
package hw4;
import java.util.Scanner;
import exceptions.EmptyException;
public class Calc {
public static void main(String[] args) {
LinkedStack<Integer> stack = new LinkedStack<>();
Scanner scanner = new Scanner(System.in);
// Create your own language definition here
// You can safely look at other samples without losing modifications.
// Modifications are not saved on browser refresh/close though -- copy often!
return {
defaultToken: 'invalid',
ignoreCase: true,
tokenPostfix: '.vrl',
brackets: [
{ open: '{', close: '}', token: 'delimiter.curly' },
@jonathanpv
jonathanpv / log.txt
Created October 25, 2022 14:54
showcasing wasm-pack working again
jon.padilla@COMP-W936N7C769 web-playground % wasm-pack build --target web --out-dir public
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
Compiling proc-macro2 v1.0.47
Compiling quote v1.0.21
Compiling unicode-ident v1.0.0
Compiling syn v1.0.103
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling memchr v2.5.0
@jonathanpv
jonathanpv / log.txt
Created October 12, 2022 18:04
list of imports after running `wasmer inspect` on `wasm-pack` generated `.wasm` binary for vrl playground
Type: wasm
Size: 9.5 MB
Imports:
Functions:
"__wbindgen_placeholder__"."__wbindgen_describe": [I32] -> []
"__wbindgen_placeholder__"."__wbindgen_is_undefined": [I32] -> [I32]
"__wbindgen_placeholder__"."__wbg_log_d0151ef59bf97787": [I32, I32] -> []
"__wbindgen_placeholder__"."__wbindgen_object_drop_ref": [I32] -> []
"__wbindgen_placeholder__"."__wbindgen_string_get": [I32, I32] -> []
"__wbindgen_placeholder__"."__wbg_getTime_f14c1fb12257cc82": [I32] -> [F64]
@jonathanpv
jonathanpv / vrl_web_playground.js
Created October 11, 2022 18:13
generated js file
let wasm;
const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
function getObject(idx) { return heap[idx]; }
let heap_next = heap.length;
@jonathanpv
jonathanpv / state.js
Created October 4, 2022 16:54
saving url state
let state = {
program: '.name2 = "jonathan2"\nkeys({"key1": "val1"})',
event: {name: "jonathan"}
}
console.log(btoa(state));
window.history.pushState(state, "", `?state=${ btoa(JSON.stringify(state)) }`);
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const stateParam = urlParams.get('state');
@jonathanpv
jonathanpv / reverse_dns error output
Created October 3, 2022 21:26
reverse_dns() when trying to compile to wasm
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Compiling socket2 v0.4.7
error[E0583]: file not found for module `sys`
--> /Users/jon.padilla/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:124:1
|
124 | mod sys;
| ^^^^^^^^
|
= help: to create the module `sys`, create file "/Users/jon.padilla/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/sys.rs" or "/Users/jon.padilla/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/sys/mod.rs"