Skip to content

Instantly share code, notes, and snippets.

View bzhr's full-sized avatar
💜
Upbeat-ing

Bozhidar Hristov bzhr

💜
Upbeat-ing
View GitHub Profile
@brentvatne
brentvatne / notes.md
Created June 20, 2020 00:51
Converting a bare React Native app to a managed Expo app

Hi there!

There's no automated way to do this, but it shouldn't be too hard to pull off! I'd say to just give it a shot using the following process:

  1. What custom native code are you using in your app? Can it be replaced by something from the Expo SDK? If not, you may not be able to use the managed workflow for now and your journey ends here.
  2. The same applies for libraries - here is an exhaustive list of libraries in the Expo SDK in an easy to read JSON format. Compare that with your package.json.
  3. Create a new project with expo init - choose blank or blank (TypeScript).
  4. Start copying your source over and getting it to a working state piece-by-piece.
  5. Configure things like the bundle identifier, icon, splash screen, and android package in app.json.
  6. Publish it in expo publish, do a simulator build with expo build:ios -t simulator and a build you can run in the Andro
@mrtony
mrtony / react_formik_yup_checkbox_validation.md
Created October 15, 2018 01:31
React formik yup checkbox, radio button validation
import "./formik-demo.css";
import React from "react";
import { render } from "react-dom";
import { Formik, Field } from "formik";
import Yup from "yup";
import classNames from "classnames";

// Input feedback

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor:

@ynonp
ynonp / discourse_discussion.jsx
Created January 8, 2018 07:14
Embedding discourse comments in React
import React from 'react';
import PropTypes from 'prop-types';
export default class DiscussionBox extends React.Component {
static propTypes = {
discourseUrl: PropTypes.string.isRequired,
discourseEmbedUrl: PropTypes.string.isRequired,
};
@codediodeio
codediodeio / index.js
Created June 28, 2017 15:54
Firebase Cloud Functions image thumbnail generator using Sharp for 4x faster resizing
const functions = require('firebase-functions');
const gcs = require('@google-cloud/storage')();
const sharp = require('sharp')
const _ = require('lodash');
const path = require('path');
const os = require('os');
exports.generateThumbnail = functions.storage.object('uploads/{imageId}').onChange(event => {
const object = event.data; // The Storage object.

Music for working, programming, reading, …

…sleeping, meditating, yoga, after hour…. Mostly ambient, drone, (neo-)classical, dub, minimal techno, deep house, micro house, downtempo, slo-mo house, ketapop, schneckno, jetlagdisco, post-rock, lowfi hip hop…

Please feel free to comment your recommendations.

@jessejanderson
jessejanderson / the_abcs_of_otp.md
Last active March 13, 2024 11:23
The ABCs of OTP

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@d0c-s4vage
d0c-s4vage / flask_sqlalchemy_historify.py
Last active March 15, 2021 16:28
Flask SQLAlchemy Historify
# I used this code directly in my models.py - it expects a `db` variable to be
# present in the globals.
#
# I also used Flask-JWT in the application that used this code. If you're not using
# Flask-JWT, you should modify `get_current_username` to not check for a current
# user using Flask-JWT.
def historify(cls):
"""
Create a new history table for the provided database model (``cls``),