Skip to content

Instantly share code, notes, and snippets.

Learning Rust

JannesD jannes-io

Learning Rust
Block or report user

Report or block jannes-io

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View schemaValidator.ts
export interface IField<T> {
key: string & keyof T;
type: 'number' | 'string' | 'object';
optional?: boolean;
export type Schema<T> = IField<T>[];
function isObj(data: unknown): data is object {
return typeof data === 'object' && !!data;
View BaseRepository.php
namespace App\Infrastructure\Repository;
use App\Component\Shared\BaseRepositoryInterface;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
* Class BaseRepository
* @package App\Infrastructure\Repository
use actix_web::error::BlockingError;
use actix_web::{web, Error as AWError, HttpResponse, Scope};
use diesel::pg::PgConnection;
use diesel::prelude::*;
use diesel::result::{DatabaseErrorKind, Error as DieselError};
use futures::Future;
use crate::models::{NewUser, User};
use crate::ConnectionPool;
jannes-io / table.tsx
Created Aug 19, 2019
Generic TS React MUI table
View table.tsx
import React, { useState } from 'react';
import {
Table as MuiTable,
TablePagination, TableSortLabel,
} from '@material-ui/core';
import * as R from 'ramda';
View gulpfile.js
const gulp = require('gulp');
const sass = require('gulp-sass');
const clean = require('gulp-clean');
const concat = require('gulp-concat');
const rename = require('gulp-rename');
const uglify = require('gulp-uglify');
const htmlmin = require('gulp-htmlmin');
const cleanCss = require('gulp-clean-css');
const htmlPartial = require('gulp-html-partial');
You can’t perform that action at this time.