Skip to content

Instantly share code, notes, and snippets.

View gotexis's full-sized avatar
🤪
Establishing the new world order

Exis gotexis

🤪
Establishing the new world order
View GitHub Profile
其实我主要是想说,我送给了你一个钥匙,希望可以打开你内心的一扇门,你笑着说,那就看看是不是可以打开。
我不敢说我完全了解你,你很不简单,是一个很有深度的女人,我还没有足够的机去了解你,但我相信我对你是用心去体会的,所以我对于我自己的想法,还是有一点自信。
其实有一瞬间我突然发现,男人一冲动,就会成为一个小孩儿一样。
你听说过内心小孩的说法吗?每个人心里都有一个内心小孩,而和你在一起,我看到了你坚强成熟的外壳下,其实同样是有一个纯真的内心小孩。
和你相处真的好开心,每次和你见面之后,我都会有一种失落感,就像磕完药的感觉。首先说我没磕过药啊,但我觉得大概嗑药之后会有这种感觉。
@gotexis
gotexis / column-def.jsx
Last active June 20, 2023 08:57
Pasting excel / google sheet into editable table with mui-datagrid-pro
{
field: "fieldname",
width: 130,
editable: true,
renderEditCell: (params) => renderCell({ ...params, onPaste }),
}
@gotexis
gotexis / childAndParent.jsx
Last active February 14, 2023 22:42
Display a modal, from child react app inside iframe, to parent react app
// Child component
// =======================================================================
import React, { useState } from 'react';
function componentToJson(component) {
let jsonTree = {};
if (typeof component === 'string') {
return { type: 'text', value: component };
} else {
jsonTree.type = component.type;
@gotexis
gotexis / csv-reducer.js
Created July 28, 2022 06:28
Anwser to Q3 - ( only doing 3.1 Sum )
const CsvReader = require('./csv-reader');
// reusing what we've done before.
const exisMath = {
sum (...args) {
return args.reduce((acc, i) => {
return parseFloat(acc) + parseFloat(i)
}, 0)
},
}
import ApolloClient from 'apollo-boost';
const client = new ApolloClient({
uri: '<your graphql endpoint>',
// Apollo Boost allows you to specify a custom error link for your client
onError: ({ graphQLErrors, networkError, operation, forward }) => {
if (graphQLErrors) {
for (let err of graphQLErrors) {
// handle errors differently based on its error code
switch (err.extensions.code) {