Skip to content

Instantly share code, notes, and snippets.

createBill = (amount) {
return Bill({
amount: amount,
});
}
createCheck = (account, bill) {
return Check({
accountId: account.id,
billId: bill.id
import { EventEmitter } from "events";
const eventEmitter = new EventEmitter();
const stubMailApi = (address: string, message: string) => {
return new Promise<{ address: string; message: string; status: string }>(
resolve => {
resolve({ address, message, status: "ok" });
}
);
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@geakstr
geakstr / safenv-snippet.tsx
Created January 9, 2019 20:36
Snippet for safenv lib
// ./utils
import { createInject, createReducerCreator } from "safenv";
import { actions } from "~/state/actions";
import { selectors } from "~/state/selectors";
import { store } from "~/state/store";
export const inject = createInject({
store,
actions,
selectors,
import * as React from "react";
import { AutoSizer, ScrollEventData, Table } from "react-virtualized";
const CELL_HEIGHT = 18;
const HEADER_HEIGHT = 27;
type Props = any;
// fetch data function
export const fetchData = async (args: {
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
import java.io.*;
import java.util.*;
public class Main {
void solve() throws IOException {
////////////////////
// Your code here //
////////////////////
import * as React from "react";
export default () => <div>Hello</div>;
# Archy Brain: Results schema
The schema defines the following properties:
## `Separator` (Separator)
## `Media` (Media)
## `Counter` (Counter)
{
"type": "object",
"title": "Archy Brain: Results schema",
"properties": {
"Separator": {
"$ref": "#/definitions/Separator"
},
"Media": {
"$ref": "#/definitions/Media"
},