Skip to content

Instantly share code, notes, and snippets.

Avatar
🐈
Meow

Mike Diarmid Salakar

🐈
Meow
View GitHub Profile
@kentcdodds
kentcdodds / useOnRead.tsx
Last active Jun 9, 2021
How I determine whether you've read a blog post.
View useOnRead.tsx
function useOnRead({
parentElRef,
onRead,
enabled = true,
}: {
parentElRef: React.RefObject<HTMLElement>
onRead: () => void
enabled: boolean
}) {
React.useEffect(() => {
@Salakar
Salakar / firebase_firestore.md
Last active Jul 17, 2020
Changes preview of the current FlutterFirebase Firestore plugin rework.
View firebase_firestore.md

Description

⚠️ NOTE: These changes may not reflect the final plugin changes/API as it's still going through review.

Along with the below changes, the plugin has undergone a quality of life update to better support exceptions thrown. Any Firestore specific errors now return a FirebaseException, allowing you to directly access the code (e.g. permission-denied) and message.

Firestore:

  • BREAKING: settings() is now a synchronous setter that accepts a Settings instance.
    • NEW: This change allows us to support changing Firestore settings (such as using the Firestore emulator) without having to quit the application, e.g. Hot Restarts.
  • DEPRECATED: Calling document() is deprecated in favor of doc().
@kelset
kelset / build-time-improvements.md
Last active Mar 9, 2021
This is kind of a blogpost about my experience of diving deep to improve some timings for an iOS React Native app
View build-time-improvements.md

Improving times for both iOS build and CI for a React Native app

Intro

Hello there.

So, if you are here you probably saw my previous tweet where I asked for tips & tricks on improving the timing on an iOS/React Native app build time.

What will follow was how I mixed those suggestions + some good old GoogleSearch-fu + me deep diving on this for ~2 days.

@edvinasbartkus
edvinasbartkus / android.yml
Created Nov 20, 2019
Running Detox tests for Android on Github Actions Workflow
View android.yml
name: Android
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
@edvinasbartkus
edvinasbartkus / .github-workflows-main.yml
Created Nov 16, 2019
Github Action for React Native Detox
View .github-workflows-main.yml
name: Detox
on: [push]
jobs:
build:
runs-on: macOS-latest
timeout-minutes: 15
env:
@JoeMatt
JoeMatt / Set Plist Bundle to Git Count.md
Last active Sep 13, 2021
Xcode 10 set Info.plist build version
View Set Plist Bundle to Git Count.md

Create Info.plist

About

This script will update Info.plist of a target in XCode with the following

  1. CFBundleVersion to the git commit count
  2. GitDate to the date of the last commit
  3. GitBranch to the current branch name
  4. GitTag to the latest tag on current branch

Creates a .version file to track last update and appease XCode needing a non-mutable output path.

@DoguD
DoguD / config.yml
Last active Feb 11, 2021 — forked from alexttransisland/gist:e8ebb98f769d31d7d0a0111550eb4bd8
Run Android emulator on CircleCI 2.0 macOS
View config.yml
version: 2
reference:
## Constants
gradle_cache_path: &gradle_cache_path
gradle_cache-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
workspace: &workspace
~/src
## Configurations
android_config: &android_config
working_directory: *workspace
@a-barbieri
a-barbieri / README.md
Last active Jun 6, 2021
NextJS sitemap generator with dynamic URL
View README.md

NextJS sitemap generator

Install

The current setup has been tested on Next Js 7.0.0.

You need to install Axios.

$ npm install axios
@osopolar
osopolar / com.user.time-machine-exclude-node-modules-job.plist
Last active Aug 19, 2021 — forked from peterdemartini/command.sh
Exclude node_modules (and more) from timemachine, use launchd to scan the Project directory on a regular basis, for example meanwhile you are having siesta. Put this file in ~/Library/LaunchAgents and call `launchctl load ~/Library/LaunchAgents/com.user.time-machine-exclude-node-modules-job.plist`
View com.user.time-machine-exclude-node-modules-job.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.time-machine-exclude-node-modules-job</string>
<key>RunAtLoad</key>
<false/>
<key>KeepAlive</key>
<false/>
@bmeck
bmeck / bus.js
Created Jun 23, 2018
it is a better API at least
View bus.js
// Example way to construct a Bus
//
// const ctrl = new SharedArrayBuffer(12);
// const size = new SharedArrayBuffer(4);
// let busSize = 4096;
// const data = new SharedArrayBuffer(busSize);
// const bufs = {ctrl,size,data,};
// const bus = new Bus(bufs);
'use strict';