Skip to content

Instantly share code, notes, and snippets.

View heygema's full-sized avatar

Gema heygema

View GitHub Profile
@heygema
heygema / i18n-rfc-gema.md
Created August 25, 2023 06:44
RFC sample for my company's internal apps

[RFC] Adopt i18next and react-i18next for Localization

Summary: Standardize on i18next and react-i18next for internationalization and localization in kodesk app.

Created: 21 July, 2023

Status: Draft

Owner: Gema Anggada (gemx@kodefox.com)

@heygema
heygema / keybase.md
Created December 13, 2021 04:35
Keybase

Keybase proof

I hereby claim:

  • I am heygema on github.
  • I am gemx (https://keybase.io/gemx) on keybase.
  • I have a public key ASBzAITT3489FfymqHviESNV8lqeY7dQPzKmofnE1RwhVgo

To claim this, I am signing this object:

@heygema
heygema / jsThis.md
Created November 22, 2021 09:35
JS this.

title: Js this tags: #programming link: topics: [[Javascript MOC]]


implicit Binding

a Binding that occurs upon the creation of the object. hint: when you try to look for where is this refers to, look at the left of the dot (.) when a function is invoked.

@heygema
heygema / Post.test.ts
Last active February 23, 2021 06:14
Prisma TDD
import { createTestContext } from "./__helpers";
const ctx = createTestContext();
it("ensures that draft can be created and published", async () => {
const draftResult = await ctx.client.request(
`
mutation {
createDraft(title: "Nexus", body: "...") {
id
@heygema
heygema / index.ts
Last active January 19, 2021 11:13
chat server gql
import path from 'path';
import express from 'express';
import http from 'http';
import {ApolloServer, gql} from 'apollo-server-express';
import makeIO from 'socket.io';
import prisma from './prismaClient';
const typeDefs = gql`
type Query {
@heygema
heygema / kotlin-run.sh
Created November 27, 2020 13:04
kotlin-run
#!/bin/sh
kotlinc main.kt -include-runtime -d main.jar
java -jar main.jar
@heygema
heygema / script.py
Created October 19, 2020 12:11
Python watchdog observer
#!/usr/local/bin/python3
from watchdog.observers import Observer
import time
from watchdog.events import FileSystemEventHandler
import os
import json
class MyHandler(FileSystemEventHandler):
def on_modified(self, event):
@heygema
heygema / logServer.js
Created September 2, 2020 17:04
logServer (next milestone is auto-generate types for yup)
const fs = require("fs");
const http = require("http");
http
.createServer((req, res) => {
res.setHeader("Content-Type", "application/json");
let endMsg = JSON.stringify({
message: "Request Finished"
});
switch (req.url) {
@heygema
heygema / keybase.md
Created June 29, 2020 05:59
keybase

Keybase proof

I hereby claim:

  • I am heygema on github.
  • I am heygema (https://keybase.io/heygema) on keybase.
  • I have a public key ASAO4ekDj5mzt4uu926YXiuPUtYCGiVHv0cfJy3OjKa2RAo

To claim this, I am signing this object:

@heygema
heygema / App.js
Created June 10, 2020 16:01
nih josh
import React from 'react';
import {View, StyleSheet, Button} from 'react-native';
import {Navigator, Route} from './Navigator';
function Screen1({navigator}) {
return (
<View style={[styles.screen, {backgroundColor: '#59C9A5'}]}>
<Button title="Screen 2" onPress={() => navigator.push('Screen2')} />
<Button title="Pop" onPress={() => navigator.pop()} />
</View>