Skip to content

Instantly share code, notes, and snippets.

package main
import (
"os"
"os/exec"
"path"
"path/filepath"
)
func main() {
@natrim
natrim / app.js
Created September 20, 2017 08:07
example of AOR 1.3.0 form crash
// in src/app.js
import React from 'react';
import { jsonServerRestClient, Admin, Resource } from 'admin-on-rest';
import { PostList, PostEdit, PostCreate } from './posts';
const App = () => (
<Admin restClient={jsonServerRestClient('http://jsonplaceholder.typicode.com')}>
<Resource name="posts" list={PostList} create={PostCreate} edit={PostEdit} />
</Admin>
);
@natrim
natrim / app.js
Created September 20, 2017 08:16
example of AOR EditButton wrong link
import React from 'react';
import { jsonServerRestClient, Admin, Resource } from 'admin-on-rest';
import createHistory from 'history/createBrowserHistory';
import { PostList, PostEdit, PostCreate } from './posts';
const history = createHistory();
const App = () => (
<Admin history={history} restClient={jsonServerRestClient('http://jsonplaceholder.typicode.com')}>
<Resource name="posts" list={PostList} create={PostCreate} edit={PostEdit} />
@natrim
natrim / convert.sh
Last active June 18, 2024 15:13
Simple conversion script that converts Godot html5 export to gzipped version, with decompressing wasm and pck files using pako
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
game="$1"
fi
@natrim
natrim / DependentInput.js
Created November 14, 2018 13:59
simplified aor-dependent-input
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { formValueSelector, getFormValues } from 'redux-form';
import get from 'lodash/get';
import set from 'lodash/set';
import FormField from 'admin-on-rest/lib/mui/form/FormField';
const REDUX_FORM_NAME = 'record-form';
||t.cncenter.cz
||cerebroad.com
||consensu.org
##b-lackhole