Skip to content

Instantly share code, notes, and snippets.

View kitze's full-sized avatar
🚀
Solving problems

Kitze kitze

🚀
Solving problems
View GitHub Profile
@kitze
kitze / AnimatedTitle.tsx
Created October 1, 2019 16:05
AnimatedTitle
import React from 'react';
import { Reveal } from 'styles/reveal';
import * as T from 'styles/shared-components/text';
//styles
import * as S from './styles';
import * as A from 'styles/shared-components';
import * as L from 'layout-styled-components';
const AnimatedTitle: React.FC<{ size?: number }> = ({ children='', size = 50 }) => {
@kitze
kitze / reveal-animations.ts
Created October 1, 2019 16:02
reveal-animations
import { createGlobalStyle, keyframes } from 'styled-components';
import fadeIn from 'react-animations/lib/fade-in';
import slideInLeft from 'react-animations/lib/slide-in-left';
import slideInRight from 'react-animations/lib/slide-in-right';
export const reveals = {
fadeInUp: 'fade-in-up',
fadeIn: 'fade-in',
slideInLeft: 'slide-in-left',
@kitze
kitze / reveal.tsx
Created October 1, 2019 16:02
Revealhttps://github.com/kitze/tortilla/blob/master/src/styles/reveal.tsx
import { VisibilityProperty } from 'csstype';
import React, { useEffect, useState } from 'react';
import { useInView } from 'react-intersection-observer';
import { reveals } from 'styles/reveal-animations';
import { CSSObject } from 'styled-components';
export enum RevealMode {
Clone,
Wrap
}
@kitze
kitze / react-advanced-hooks.js
Last active March 3, 2020 09:35
React Advanced Hooks
import React, {useEffect, useState} from "react";
import { useEffect, useState } from "react";
export const useTimer = (initialValue = 0, duration = 1000, step = 1) => {
const [timer, setTimer] = useState(initialValue);
useEffect(() => {
const interval = setInterval(() => {
setTimer(timer => timer + step);
@kitze
kitze / app-styles.css
Created May 28, 2019 17:52
app styles
.App {
font-family: sans-serif;
}
body {
background-color: rgb(36, 36, 36);
color: white;
}
.article {
@kitze
kitze / fake-data-graphql.js
Last active May 27, 2019 18:02
Fake data for reactacademy.io GraphQL workshop
const data = {
users: [
{
id: "c91ec707-215c-473d-8187-a0bb06f12b8f",
name: "Lilian Keebler",
email: "Mathew8@gmail.com",
password: "software",
age: 41,
isEmployed: true
},
@kitze
kitze / data.json
Created April 7, 2019 13:03
data.json
{
"articles": [
{
"id": 1,
"title": "Hello world",
"body": "The content of the article"
},
{
"id": 2,
"title": "Hello there",
@kitze
kitze / speaking.mdx
Last active February 1, 2023 08:44
Speaking
@kitze
kitze / auto-updates.js
Created March 23, 2019 11:03
electron auto update
// Packages
const { app, dialog, autoUpdater } = require('electron');
const ms = require('ms');
const isDev = require('electron-is-dev');
const logger = require('electron-timber');
const notify = require('./notify');
const got = require('got');
// Utilities
const { version: packageJsonVersion } = require('../package');
@kitze
kitze / decision.md
Created February 26, 2019 20:53
Decide about S10

Decide about switching to S10

Pros

  • Automatic google photos upload in background
  • Working GBoard
  • Tap to place keyboard cursor
  • Better autocomplete
  • Nova Launcher
  • Google assistant > Siri
  • Real file system