Skip to content

Instantly share code, notes, and snippets.

Working on Foam

Jani Eväkallio jevakallio

Working on Foam
View GitHub Profile
jevakallio /
Last active Jul 12, 2021
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 Jul 21, 2021
`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 Apr 17, 2019
Apollo/Fraql fragments. just an example, not syntactically correct
View List.jsx
import gql from 'fraql'
import { ListRow } from './ListRow';
// this is the whole list
export const List = ({ users }) => (
{ => <ListRow user={user} />)}
View lol.html
<!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 Apr 3, 2018

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 Dec 14, 2017
React Native Horizontal Picker
View HorizontalPicker.js
// @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';
View TweetPresenter.js
// 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 Oct 3, 2020
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 Jul 7, 2021
#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 Dec 9, 2016
React Native: Synchronized ScrollViews
View synchronized-scrolling.js
import Exponent from 'exponent';
import React from 'react';
import { range } from 'lodash';
import {