Skip to content

Instantly share code, notes, and snippets.

View aight8's full-sized avatar

Sebastian Fekete aight8

View GitHub Profile
@aight8
aight8 / snippet.ts
Last active November 5, 2023 16:57
react native / react-native-navigation / mobx / realm-js
function createRalmApp() {
return new Realm.App({
id: 'xxxxxx',
})
}
function createRalm(user: Realm.User | null) {
const realmConfig = {
schema: [
// your schemas..
@aight8
aight8 / node.tmpl.go
Created October 21, 2020 12:55
golang ent template: Create Node By Required field method
{{define "node"}}
// ...
{{range $node := $.Nodes}}
{{$requiredFieldIndices := xrange 0}}
{{range $index, $field := $node.Fields}}
{{if and (not $field.Optional) (not $field.Default) (not $field.Immutable) -}}
{{$requiredFieldIndices = append $requiredFieldIndices $index}}
{{end}}
@aight8
aight8 / react-table.d.ts
Created May 23, 2017 22:29
@types/react-table/index.d.ts
declare module 'react-table' {
const val: ReactTable
export default val
}
declare module ReactTable {
import * as React from 'react'
type AccessorFunction = (row: object) => any
type Accessor = string | string[] | object | AccessorFunction
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Form\Element;