Skip to content

Instantly share code, notes, and snippets.

@ksaldana1
ksaldana1 / keybase.md
Created April 24, 2023 15:01
keybase.md

Keybase proof

I hereby claim:

  • I am ksaldana1 on github.
  • I am ksaldana (https://keybase.io/ksaldana) on keybase.
  • I have a public key ASBUNkRku9I4HSFgickNwlwMqY1Pr3Qo8ZQa-klYe3bumAo

To claim this, I am signing this object:

type Query {
messages: [Message!]!
}
type Message {
id: ID!
text: String!
author: MessageAuthor!
}
@ksaldana1
ksaldana1 / re_example_4.re
Created March 13, 2020 01:32
re_example_4
module Styles = {
open Css;
let app =
style([
display(`flex),
justifyContent(`center),
alignItems(`center),
flexDirection(`column),
minHeight(`vh(100.0)),
@ksaldana1
ksaldana1 / re_example_fix_2.re
Created March 13, 2020 01:32
re_example_fix_2.re
module Styles = {
open Css;
let app =
style([
display(`flex),
justifyContent(`center),
alignItems(`center),
flexDirection(`column),
minHeight(`vh(100.0)),
@ksaldana1
ksaldana1 / re_example_2.re
Created March 13, 2020 01:30
re_example_2
module Styles = {
open Css;
let app =
style([
display(`flex),
justifyContent(`center),
alignItems(`center),
flexDirection(`column),
minHeight(`vh(100.0)),
@ksaldana1
ksaldana1 / re_example_1_4.re
Created March 13, 2020 01:30
re_example_1.4
[@react.component]
let make = () => {
let query = Query.use(~variables=(), ());
<div className=Styles.app>
{Belt.Array.map(query.messages, message => {
switch (message.author) {
| `User(user) =>
<div> {React.string(user.name ++ ": " ++ message.text)} </div>
| `Guest(guest) =>
<div>
@ksaldana1
ksaldana1 / re_example_1_3.re
Created March 13, 2020 01:29
re_example_1.3
module Styles = {
open Css;
let app =
style([
display(`flex),
justifyContent(`center),
alignItems(`center),
flexDirection(`column),
minHeight(`vh(100.0)),
@ksaldana1
ksaldana1 / re_example_1_2.re
Created March 13, 2020 01:29
re_example_1.2
module Query = [%relay.query
{|
query AppQuery {
messages {
id
text
author {
__typename
...on User {
id
@ksaldana1
ksaldana1 / reason_example_1.re
Created March 13, 2020 01:28
reason_example_1
module Query = [%relay.query
{|
query AppQuery {
messages {
id
text
author {
__typename
...on User {
id
@ksaldana1
ksaldana1 / ts_example_4_fix.ts
Created March 13, 2020 01:27
ts_example_4_fix
function premiumColor(role: USER_ROLE) {
switch (role) {
case "PREMIUM": {
return "red";
}
case "WHALE": {
return "blue";
}
case "FREE": {
return "black";