Skip to content

Instantly share code, notes, and snippets.

View tomaash's full-sized avatar

Tomas Holas tomaash

View GitHub Profile
@tomaash
tomaash / transcript_summary.txt
Created March 2, 2023 11:10
ChatGPT transcript summary result
Summary:
Tommy and Just Someone are discussing programming languages. They start with Scratch, which is designed to make programming as easy as possible and is recommended for beginners. They then discuss Basic, which was included in most personal computers and was a popular option for coding for many years. They move on to high-level languages, specifically Python and JavaScript, which are popular today. JavaScript is required for web development and is used for almost every application that can be written in it. The conversation ends before they finish discussing the benefits of learning these languages.
Original transcript:
Tommy: Which
Just Someone: Set, which ironically
Tommy: ironically
Just Someone: you can represent a code with any 1 of the languages we're about to look at. And before we get started, there's a way of programming icebergs out there. But this 1 ranks languages based on where I think
@tomaash
tomaash / SwiftPersonaFlutterPlugin.swift
Created April 23, 2021 11:49
ios swift log font names
for fontFamilyName in UIFont.familyNames{
for fontName in UIFont.fontNames(forFamilyName: fontFamilyName){
os_log("FAMILY: %@, NAME: %@", log: .default, fontFamilyName, fontName);
}
}
@tomaash
tomaash / pulsar.iro
Last active February 5, 2021 16:19
IRO grammar of Pulsar language
#################################################################
## Iro
################################################################
##
## * Press Ctrl + '+'/'-' To Zoom in
## * Press Ctrl + S to save and recalculate...
## * Documents are saved to web storage.
## * Only one save slot supported.
## * Matches cannot span lines.
## * Unicode chars must be defined in \u0000 to \uffff format.
@tomaash
tomaash / flutter_styles.dart
Created March 26, 2020 11:56
Flutter styles used in my mobile app
class AppStyles {
static const defaultFont = 'Poppins';
static const paddingXl = EdgeInsets.all(32);
static const paddingLg = EdgeInsets.all(16);
static const paddingMd = EdgeInsets.all(8);
static const TextStyle textXxsMedium =
TextStyle(fontSize: 10, fontWeight: FontWeight.w500);
static const TextStyle textXxsGray =
TextStyle(fontSize: 10, color: Colors.black54);
@tomaash
tomaash / talwind.config.js
Created August 16, 2019 13:59
tailwind children variants
module.exports = {
variants: {
margin: ['responsive', 'children', 'not-first', 'not-last'],
padding: ['responsive', 'children', 'not-first', 'not-last'],
borderWidth: ['responsive', 'children', 'not-first', 'not-last']
},
plugins: [
/**
*
* Usage example for children variants
@tomaash
tomaash / settings.tsx
Created July 18, 2019 17:56
mstform example
import React from 'react'
import { observer } from 'mobx-react-lite'
import validatorjs from 'validatorjs'
import MobxReactForm from 'mobx-react-form'
import dvr from 'mobx-react-form/lib/validators/DVR'
import { MaterialTextField } from './MaterialTextField'
import { Button } from '@material-ui/core'
import { SnackbarPopup } from './shared/SnackbarPopup'
import { useLocalStore } from 'mobx-react-lite'
import { RouteComponentProps } from '@reach/router'
.disable_item() {
cursor: not-allowed;
pointer-events: none;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
opacity: .65;
}
// HACK: restore sort order, which has been lost by react admin for some reason
const asc = currentSort.order === 'ASC'
const topValue = asc ? 1 : -1
const bottomValue = asc ? -1 : 1
const { field } = currentSort
// Data is passed as an object, which is not sorted
const keys = Object.keys(data || {})
const dataArray = keys
.map(k => data[k])
.sort((a, b) => {
@tomaash
tomaash / InverseBooleanInput.js
Created February 28, 2019 16:34
inverted boolean input for react-admin (does not work XD)
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import FormGroup from '@material-ui/core/FormGroup';
import Switch from '@material-ui/core/Switch';
import { addField, FieldTitle } from 'ra-core';
const sanitizeRestProps = ({
alwaysOn,
basePath,
@tomaash
tomaash / mongoserver.test.js
Created July 14, 2018 13:47
In memory mongoserver for jest
const MongodbMemoryServer = require('mongodb-memory-server').default
const mongoose = require('mongoose')
const opts = { useMongoClient: true } // remove this option if you use mongoose 5 and above
const Fixtures = require('node-mongodb-fixtures')
const RecruiterTeam = require('../../models/recruiter/recruiterteam').RecruiterTeam
const sinon = require('sinon')
const firebase = require('firebase-admin')