Skip to content

Instantly share code, notes, and snippets.

View harriha's full-sized avatar

Harri Hälikkä harriha

  • Futurice
  • Helsinki, Finland
View GitHub Profile
@wojtekmaj
wojtekmaj / settings.json
Last active February 14, 2025 13:35
VSCode settings worth checking out
{
// Enables breadcrumbs
"breadcrumbs.enabled": true,
// Slightly improves performance if you don't usescreen reader
"editor.accessibilitySupport": "off",
// My favorite font settings
"editor.fontFamily": "'Fira Code', monospace",
"editor.fontLigatures": true,

Test Your Library against React Native 0.74.0-rcs.

We cut the branch for 0.74 and we released the first RCs. We would like to check that the libraries in the ecosystem are working well, especially with the New Architecture.

To simplify the work, we prepared a sort of template you can use to test your library against the most recent version of React Native. There are two ways to test this:

  1. Using a newly created app;
  2. Using the example app that might live in your library repo.

The first approach can be used to check whether the latest version you already released is compatible with the New Architecture.

@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active May 4, 2025 13:20
Building a react native app in WSL2
@ykarikos
ykarikos / docker-ssl-proxy.md
Last active February 21, 2025 19:30
Self-signed SSL reverse proxy with Docker

Self-signed SSL reverse proxy with Docker

This is based on the marvellous blog posting by Oliver Zampieri.

This howto is written to create a self signed SSL NginX proxy on MacOS to

  1. Expose proxy at local host port 5001
  2. Connect the port 5001 to port 443 inside Docker
  3. Proxy the port 443 to port 5000 on the host computer

This means that:

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at [email protected] or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@milankorsos
milankorsos / redux-actions.ts
Last active January 10, 2025 19:22
Correct TypeScript typing example for Redux Thunk actions
import {Action, ActionCreator, Dispatch} from 'redux';
import {ThunkAction} from 'redux-thunk';
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => {
return {
type: SET_TEXT,
text
};
};
@threepointone
threepointone / glam-for-css-folks.md
Last active September 4, 2022 07:43
why css purists will love glam

I made a little styling lib called glam

(some features are in development)

one

let's start off with the simplest use case. we'll make an 'index.html' page, and assume we've setup our js bundler to output bundle.js

@developit
developit / purecomponent.js
Created April 25, 2017 11:43
PureComponent for preact
import { Component } from 'preact';
export default class PureComponent extends Component {
shouldComponentUpdate(props, state) {
return !(shallowEqual(props, this.props) && shallowEqual(state, this.state));
}
}
function shallowEqual(a, b) {
for (let key in a) if (a[key]!==b[key]) return false;
@tkh44
tkh44 / Home.js
Last active September 13, 2022 01:32
Example of using branch to conditionally render components based on auth state
import authDoor from 'hoc/auth-door'
import Loadable from 'react-loadable';
import Loading from './Loading'
const Dashboard = Loadable({
loader: () => import('pages/Dashboard'),
LoadingComponent: Loading,
// optional options...
delay: 200,
serverSideRequirePath: path.join(__dirname, 'pages/Dashboard'),
@vsaarinen
vsaarinen / react-some-component.d.ts
Last active April 25, 2020 22:42
How to add TypeScript prop type definitions to an existing React component
import * as React from 'react';
declare class SomeReactComponent extends React.Component<SomeReactComponentProps, any> {}
interface SomeReactComponentProps {
className?: string;
toggle?: boolean;
name: string;
size?: 'lg' | '2x' | '3x' | '4x' | '5x';
}