Skip to content

Instantly share code, notes, and snippets.

jevakallio /
Last active July 18, 2022 11:02
React SSR, SSG, SPA - History & Colour

SSR History & Colour

  • Three React approaches
    • SPA Single Page Applications
    • SSR Server Side Rendering
    • SSG Static Site Generation

    • SPA - Single Page Applications :: fat client, API
      • Send plain javascript that does on everything on client
      • SEO nightmare
  • Google Crawler is starting to execute JavaScript
jevakallio /
Last active May 20, 2024 19:44
`adb pull` from app data directory without root access

TL;DR; is your app identifier, and the file path is relative to the app user's home directory, e.g. '/data/user/0/

adb shell run-as cp relative/path/file.ext /sdcard
adb pull /sdcard/file.ext

See long explanation below.

jevakallio / List.jsx
Last active April 17, 2019 02:46
Apollo/Fraql fragments. just an example, not syntactically correct
import gql from 'fraql'
import { ListRow } from './ListRow';
// this is the whole list
export const List = ({ users }) => (
{ => <ListRow user={user} />)}
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
content="width=device-width, initial-scale=1, shrink-to-fit=no"
<meta name="theme-color" content="#000000" />
jevakallio /
Created April 3, 2018 15:34

componentDidSmoosh Code of Conduct

All guests, speakers, and volunteers at the componentDidSmoosh event are required to agree with the following code of conduct. Organizers will enforce this code throughout the event.

Because this is a comedy event, the tone and content of the presentations will differ from your usual tech event. Strong language, adult themes and dark humour may be presented. However, we the event organizers, are committed to providing a safe and inclusive space for our audience, and aim to create an environment of fun, love, kindness and respect for all our fellow human beings.

The Quick Version

jevakallio / HorizontalPicker.js
Created December 14, 2017 12:06
React Native Horizontal Picker
// @flow
import React, { Component, type Node } from 'react';
import styled from 'styled-components/native';
import Touchable from 'react-native-platform-touchable';
import Carousel from 'react-native-snap-carousel';
// $FlowFixMe
import { LinearGradient } from 'expo';
jevakallio / TweetPresenter.js
Created April 27, 2017 09:28
Tweet Presenter!
// paste this to chrome console on anybody's twitter page
// and it'll turn into an instant presentation :)
(function TweetPresent() {
const presenter = $(`<div id="tpd" style=" position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; padding: 10vh 10vw; box-sizing: border-box; background-color: white; font-size: 5vw; text-align: center; z-index: 9999; display: flex; align-items: center; justify-content: center;"></div>`);
const tweets = $$(`div.tweet p.js-tweet-text`)
.map(el => el.innerHTML)
.map(t => ({t, s: Math.random()}))
.sort((a, b) => a.s > b.s ? -1 : 1)
.map(c => c.t);
jevakallio /
Last active July 24, 2022 02:37
React Native For Beginners


React Native makes it possible to make native iOS and Android mobile apps without needing to know any iOS or Android programming - just JavaScript!

In this course, we'll write a simple mobile app that you can run on your own phone and share with your friends!


In order to take advantage this course, you should have the following experience.

jevakallio /
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

jevakallio / synchronized-scrolling.js
Created December 9, 2016 23:54
React Native: Synchronized ScrollViews
import Exponent from 'exponent';
import React from 'react';
import { range } from 'lodash';
import {