Skip to content

Instantly share code, notes, and snippets.

View getJv's full-sized avatar
🎯
Focusing

Jhonatan Morais getJv

🎯
Focusing
  • Brasília, Brasil
View GitHub Profile
@getJv
getJv / idltype.ts
Last active October 9, 2024 09:42
turbin3 IDL type
export type Turbin3Prereq = {
"address": "WBAQSygkwMox2VuWKU133NxFrpDZUBdvSBeaBEue2Jq",
"metadata": {
"name": "wba_prereq",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
@getJv
getJv / host-page.html
Created October 11, 2020 05:26
A sample of receiving the window postMessage from host-page
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
window.addEventListener("message", (event) => {
let iframe = document.querySelector('#my-iframe');
iframe.height = event.data.height;
});
@getJv
getJv / guest-page.html
Last active October 11, 2020 05:18
A sample of using the window postMessage from guest-page
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>
<div id="app">
<template>
<div>Test page</div>
</template>
<script>
export default {
name: "Mycomponent",
beforeCreate() {
console.log("beforeCreate");
},
import Vue from "vue";
import App from "./App.vue";
import customMethods from "@/plugins/customMethods.js";
Vue.use(customMethods);
// ... ommited
const customMethods = {
install(Vue) {
// INSTALL
if (this.installed) return;
this.installed = true;
Vue.options = Vue.util.mergeOptions(Vue.options, {
created: function() {
if (this.$options.customMethod) {
// If found in the component.
@getJv
getJv / git.md
Created August 19, 2018 23:42 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda