Skip to content

Instantly share code, notes, and snippets.

View tlimpanont's full-sized avatar
🏠
Working from home

Theuy Limpanont tlimpanont

🏠
Working from home
View GitHub Profile
@tlimpanont
tlimpanont / README.md
Last active August 7, 2022 14:43
xState form submission machine

image

@tlimpanont
tlimpanont / full-custom-composition.tsx
Last active July 24, 2022 07:28
custom appbar with (submenu) implementations 1) with fully flexible way of composing your own JSX elements 2) a mix of flexible way of composing menu items and opiniated slot properties to guarantee correct styling and lay-out placements.
/**
de eerste is dat in elke applicatie als je een appbar met menu nodig hebt je volledig JSX structuur
opnieuw moet opbouwen (wel super flexibel en vrij)
*/
import {
Box,
ButtonBase,
IconButton,
ListItem,
{
"name": "Workout name",
"difficulty": 1,
"duration": 1,
"asset": {
"url": "www.assets.com",
"type": "video/mp4"
},
"rounds": [
{
@tlimpanont
tlimpanont / datamodel.graphql
Last active December 18, 2018 15:59
GraphQL data examples for IMAGR
type PipelineStep {
id: ID! @unique
stepOrder: Int
definition: StepDefinition
}
enum MODULE_TYPE {
DOCKER
}
window.ClearanceOverviewDockableFrame.getJSPreferences = function() {
return `{ "filter": { "transferred": false, "movement": true, "isps": false, "substances": false, "channelBound": false, "hoursFutureArrivalTransit": 0, "hoursFutureDepartureShift": 0, "hoursFutureISPS": 0, "hoursFutureSubstances": 0 }, "follow": true, "sorts": [{ "prop": "beginTime", "dir": "desc" }, { "prop": "draught", "dir": "asc" }, { "prop": "length", "dir": "asc" }, { "prop": "beam", "dir": "asc" } ], "sizes": {}, "order": [{ "prop": "ucrn", "order": 0 }, { "prop": "type", "order": 1 }, { "prop": "reasons", "order": 2 }, { "prop": "callSign", "order": 3 }, { "prop": "shipName", "order": 4 }, { "prop": "beginTime", "order": 5 }, { "prop": "movementType", "order": 6 }, { "prop": "destination", "order": 7 }, { "prop": "length", "order": 8 }, { "prop": "beam", "order": 9 }, { "prop": "draught", "order": 10 }, { "prop": "shipType", "order": 11 }, { "prop": "orderStatus", "order": 12 } ] }`
}
@tlimpanont
tlimpanont / read-temperature-from-MCP9808.cpp
Created April 9, 2018 20:29
Read temperature from MCP9808
#include "MCP9808.h"
MCP9808::MCP9808(PinName sda, PinName scl) : i2c(sda, scl)
{
}
// read temperature from MCP9808
float MCP9808::readTemp()
{
data_write[0] = MCP9808_REG_TEMP;
@tlimpanont
tlimpanont / clearance-overview.effects.ts
Last active April 5, 2018 07:54
clearance-overview.effects.ts
import * as clearanceSelectors from "../selectors";
import {Injectable} from "@angular/core";
import {Actions, Effect} from "@ngrx/effects";
import {Observable} from "rxjs";
import {
ACTION_AUTO_REFRESH_TIMEOUT_OCCURRED,
ACTION_COLUMN_ORDER_UPDATED,
ACTION_COLUMN_WIDTH_UPDATED,
ACTION_COLUMN_SORT_UPDATED,
ACTION_FILTER_UPDATED,
@tlimpanont
tlimpanont / AuthService.js
Last active July 9, 2017 17:39
authentication with auth0 and vue js
import auth0 from 'auth0-js'
import { AUTH_CONFIG } from './auth0-variables'
import EventEmitter from 'EventEmitter'
import router from './../router'
export default class AuthService {
// Initiating our Auth0Lock
lock = new Auth0Lock(
AUTH_CONFIG.clientId,
@tlimpanont
tlimpanont / app.component.spec.ts
Last active September 16, 2016 10:00
testing ng2-translate in view
/* tslint:disable:no-unused-variable */
import { AppComponent } from './app.component';
import { TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import {TranslateService, TranslateModule} from "ng2-translate/ng2-translate";
We couldn’t find that file to show.