Skip to content

Instantly share code, notes, and snippets.

:shipit:
*tec tec tec noises*

Gabriel Rohden Grohden

:shipit:
*tec tec tec noises*
View GitHub Profile
@Grohden
Grohden / shrekd.dart
Created Jul 6, 2020
Shrek ascii art found somewhere on internet
View shrekd.dart
// ⡴⠑⡄⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠸⡇⠀⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀⠀⠀⢀⢴⣶
// ⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦⣴⣾⠁⠸⣼
// ⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟⠉⠀⠀⠀⠀
// ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀
// ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇⠀⠀⠀⠀⠀
@Grohden
Grohden / main.dart
Last active Jul 1, 2020
Dart extension for DateTime sum/subtraction operations
View main.dart
extension CopyWithAdditional on DateTime {
DateTime copyWithAdditional({
int years,
int months = 0,
int days = 0,
int hours = 0,
int minutes = 0,
int seconds = 0,
int milliseconds = 0,
int microseconds = 0,
@Grohden
Grohden / CurrencyInput.tsx
Last active Jun 18, 2020
SIMPLE react native currency input for brazilian currency
View CurrencyInput.tsx
/* eslint-disable @typescript-eslint/no-magic-numbers */
import { useRefCallback } from '@hooks/useRefCallback'
import React from 'react'
import { StyleProp, ViewStyle } from 'react-native'
import { TextInput } from 'react-native-paper'
type Props = {
label: string
value: number
onChangeValue: (value: number) => void
@Grohden
Grohden / flambda.dart
Last active Jul 2, 2020
Pain and suffering by forcing ramda into everything (in this case, dart)
View flambda.dart
library flambda;
typedef Predicate<T> = bool Function(T);
class Case<T, R> {
Case(this.predicate, this.whenTrue);
factory Case.otherwise(R Function(T) whenTrue) {
return Case((T) => true, whenTrue);
@Grohden
Grohden / home.dart
Created May 23, 2020
Prototype for home screen decentralisation of routes 'upper' widgets
View home.dart
class _HomeItem {
_HomeItem({
@required this.appbar,
@required this.body
});
final PreferredSizeWidget appbar;
final Widget body;
}
View debounce.ts
// calls always the last
export const debounce = (time: number) => {
let timeout: ReturnType<typeof setTimeout> | null = null
return (fn: () => void) => {
if(timeout !== null) {
clearTimeout(timeout)
timeout = null
}
@Grohden
Grohden / Label.tsx
Last active Apr 9, 2020
Slider prototype for react native
View Label.tsx
/* eslint-disable no-magic-numbers */
import React from 'react'
import { StyleSheet, Text, View, ViewStyle } from 'react-native'
import { BaseColors } from '@constants/colors'
import fonts from '@constants/fonts'
type Props = {
style: ViewStyle
}
@Grohden
Grohden / detox-run-android.yml
Created Mar 19, 2020
Azure devops detox run tests for ios and android
View detox-run-android.yml
trigger:
- none
pool:
vmImage: 'ubuntu-latest'
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle
@Grohden
Grohden / nh.graphql
Last active Mar 19, 2020
NHentai rest api (kinda not documented) consumed and mapped by graphql
View nh.graphql
directive @client on FIELD
type GalleryItemImage {
t: String!,
w: Int!,
h: Int
}
type GalleryItemTag {
count: Int!
id: ID
@Grohden
Grohden / AnimatedMock.js
Created Jan 30, 2020
Fixed file for react native AnimatedMock.js
View AnimatedMock.js
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
You can’t perform that action at this time.