Skip to content

Instantly share code, notes, and snippets.


Mithi Sevilla mithi

View GitHub Profile
Ciantic / example-typeorm-jest.test.ts
Created Apr 16, 2019
Example of testing TypeOrm with Jest and Sqlite in-memory database
View example-typeorm-jest.test.ts
import { createConnection, getConnection, Entity, getRepository } from "typeorm";
import { PrimaryGeneratedColumn, Column } from "typeorm";
export class MyEntity {
id?: number;
name?: string;
View axis.d.ts
declare module '@vx/axis' {
import React from 'react';
import { ScaleTime } from 'd3-scale';
interface Point {
x: number;
y: number;
interface AxisProps {

Advanced React by React Training

Personal notes while working through Advanced React:

Granted this is a contrived example, but it's still something I took notice to: in those "Advanced React" videos I've been watching, Ryan Florence codes very slowly, and does not make one quick change and jump back to the browser to see what changed.

He stops and thinks. He asks himself (or the viewer) questions. He wonders what

pierrejoubert73 /
Last active Jan 17, 2022
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!


  1. A numbered
  2. list
    • With some
    • Sub bullets
guillaumegarcia13 /
Created Apr 4, 2017
HTML forms and input tags cheatsheet. All you need to know to write every HTML form possible, including links to good resources on HTML and the new HTML5 form and input options...

HTML Forms

In order that you never go to W3Schools (never go there), here is a basic cheat sheet for writing simple HTML forms.

This is culled from a few sources, [the most important being MDN][MDN]. MDN (the Mozilla Developer Network) should be seen as "the docs" when you are having an issue with HTML.

hediet /
Last active Jan 14, 2022
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";

interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
slavikdev /
Created Mar 16, 2017
Rails request path cheatsheet

Rails request path cheatsheet

Full path with query string

>>  request.url
=> "http://localhost:3000/ask-help.amp?hui=pizda"

Virtual path without query string

>>  request.path
=> "/ask-help.amp"
jonathansick / query.graphql
Last active Aug 5, 2021
GitHub GraphQL repo commit history query
View query.graphql
repository(name: "sickvim", owner: "jonathansick") {
ref(qualifiedName: "master") {
target {
... on Commit {
history(first: 5) {
pageInfo {
joncardasis /
Last active Jan 15, 2022
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets