Skip to content

Instantly share code, notes, and snippets.

View Salakar's full-sized avatar
🎯
Darting around the place 24/7

Mike Diarmid Salakar

🎯
Darting around the place 24/7
View GitHub Profile
@deepfates
deepfates / convert_archive.py
Created November 17, 2024 19:33
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple
@mikehardy
mikehardy / README.md
Last active September 2, 2022 19:15
Android emulator performance on macos-11 Github Actions Runners

Performance characteristics of Android emulators on GitHub Actions

Lots of projects need to test android apps, and use GitHub Actions infrastructure to do so.

This document intends to show current timings for a sample workload, to inform what emulators are a good match for testing.

Test Conditions

  • We use the AnkiDroid androidTests
  • they are long enough to execute that they form a nice balance between cold start emulator time so neither dominates
@TheRealFlyingCoder
TheRealFlyingCoder / . Github Actions: Remix + Cloud Run + Docker
Last active November 12, 2024 17:45
Github Actions: Remix + Cloud Run + Docker
So Github workflow for deploying a docker image to GCR, and subsequently pushing that to a cloud run instance is pretty easy
First just add your github tokens:
GCP_SERVICE_ID
GCP_PROJECT_ID
GCP_REGION <-- your services deploy region
GCP_SA_KEY <-- Follow the method in here (http://acaird.github.io/computers/2020/02/11/github-google-container-cloud-run)
Take note that my Dockerfile is specifically for an Express.js remix app, where Remix builds to `/server/build`.
@kentcdodds
kentcdodds / useOnRead.tsx
Last active June 9, 2021 04:24
How I determine whether you've read a blog post.
function useOnRead({
parentElRef,
onRead,
enabled = true,
}: {
parentElRef: React.RefObject<HTMLElement>
onRead: () => void
enabled: boolean
}) {
React.useEffect(() => {
@Salakar
Salakar / firebase_firestore.md
Last active January 28, 2022 21:59
Changes preview of the current FlutterFirebase Firestore plugin rework.

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().
@pascalandy
pascalandy / compose-caddy.yml
Last active December 12, 2024 08:29
Traefik V2 / my docker compose files
version: "3.3"
services:
caddy:
image: abiosoft/caddy:1.0.3-no-stats
container_name: caddy
hostname: caddy
restart: unless-stopped
volumes:
@kelset
kelset / build-time-improvements.md
Last active June 21, 2023 19:25
This is kind of a blogpost about my experience of diving deep to improve some timings for an iOS React Native app

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 November 20, 2019 14:45
Running Detox tests for Android on Github Actions Workflow
name: Android
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
@edvinasbartkus
edvinasbartkus / .github-workflows-main.yml
Created November 16, 2019 10:06
Github Action for React Native Detox
name: Detox
on: [push]
jobs:
build:
runs-on: macOS-latest
timeout-minutes: 15
env:
@fnky
fnky / ANSI.md
Last active December 26, 2024 14:33
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27