Skip to content

Instantly share code, notes, and snippets.

@doomsower
doomsower / get-abis.ts
Created December 14, 2023 11:56
Script to update abis
import { ethers } from "ethers";
import fs from "fs";
import path from "path";
// Define the callback function type
type ProcessJsonCallback = (json: any, path: string) => void;
// Function to process a JSON file
const processJsonFile = (filePath: string, callback: ProcessJsonCallback) => {
try {
@doomsower
doomsower / query.graphql
Created April 22, 2019 19:22
whitewater.guide sample query and result
{
sections(filter: { regionId: "337c9466-4242-11e8-aa0e-87e0dc325cf4"}, page: { limit: 5 }) {
nodes {
id
name
altNames
description
season
seasonNumeric
river {
@doomsower
doomsower / github-wide-wiki.user.js
Created January 21, 2019 08:00
Make github wiki occupy full screen width
// ==UserScript==
// @name Github wide wiki
// @version 1
// @grant none
// @include https://github.com/*/*/wiki/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
$(document).ready(function ()
{
@doomsower
doomsower / react-native-paper.d.ts
Created August 26, 2018 13:30
react-native-paper.d.ts
// tslint:disable:max-classes-per-file
declare module 'react-native-paper' {
import { Component, ReactNode } from 'react';
import {
StyleProp,
TextProps,
TextStyle,
TouchableHighlightProps,
TouchableNativeFeedbackProps,
ViewProps,
@doomsower
doomsower / Podfile
Created December 13, 2017 07:47
Appcenter question podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'swapp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for swapp
pod 'AppCenter/Crashes', '~> 1.0.1'
pod 'AppCenter/Analytics', '~> 1.0.1'
@doomsower
doomsower / yarn.lock
Created October 12, 2017 13:04
An issue with moment-with-locales and metro-bundler
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@expo/react-native-action-sheet@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@expo/react-native-action-sheet/-/react-native-action-sheet-1.0.1.tgz#c02f36688a1e4f8dc60890ff3c734944af541c6b"
dependencies:
hoist-non-react-statics "^2.2.2"
prop-types "^15.5.10"
@doomsower
doomsower / formContainer.test.ts
Created September 24, 2017 14:25
Using react apollo with redux-form
import { createMemoryHistory, History } from 'history';
import * as Joi from 'joi';
import * as React from 'react';
import { Provider } from 'react-redux';
import { MemoryRouter, Router } from 'react-router';
import { ComponentEnhancer, withProps } from 'recompose';
import { combineReducers, createStore } from 'redux';
import { InjectedFormProps, reducer as formReducer } from 'redux-form';
import { mountWithMuiContext } from '../../test';
import { Omit } from '../../ww-commons/ts';
@doomsower
doomsower / photos.json
Created June 1, 2017 19:43
Deleted photos
[/* 1 */
{
"_id" : "3uefAw5ECrpZXXThq",
"url" : "http://wwater.tk/public/N98sMHd636wHMPncE.png",
"type" : "photo",
"description" : "The first canyon. Rider: Mike Krutyansky. Screenshot: Ivan Kozlachkov",
"copyright" : null
}
/* 2 */
@doomsower
doomsower / gist:489a2750974d02c1672b630c104b603e
Created January 19, 2017 19:27
Имена стертых файлов
new3_260515_новый размер.jpg
new3_23_новый размер.jpg
P4146187.jpg
Ecuador-Colombia-05614.jpg
vlcsnap-2017-01-15-12h49m51s18_новый размер.png
img003.jpg
vlcsnap-2017-01-15-12h47m36s152_новый размер.png
SAC-20161129-132443_новый размер.jpg
P4126054_новый размер.jpg
SAC-20161206-153246.jpg
@doomsower
doomsower / javascript.json
Created August 10, 2016 13:11
VSCode rn snippets
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",