Skip to content

Instantly share code, notes, and snippets.

View michaelgira23's full-sized avatar

Michael Gira michaelgira23

View GitHub Profile
# GitHub Action that will run prettier on the whole repo and commit the changes to the PR.
name: Prettier
on:
pull_request:
branches: [main]
jobs:
prettier:
runs-on: ubuntu-latest
@nderscore
nderscore / TamaguiZeego.tsx
Last active February 9, 2025 20:50
Example of how to wrap Zeego's components with Tamagui styles
import { FC } from 'react';
/**
* Utilities to make Typescript happy wrapping Zeego components with Tamagui's
* styled() components. These utils do nothing except assign Typescript types.
*
* Makes the following props optional and of `unknown` type:
* - children
* - key
*
@nandorojo
nandorojo / index.tsx
Last active February 24, 2025 02:07
LayoutView: Moti + Framer Motion + React Native (+ Web)
import { MotiView } from 'moti'
import { styled } from 'dripsy'
import { LayoutViewProps } from './types'
import { Layout } from 'react-native-reanimated'
const LayoutView = ({ state, layout, ...props }: LayoutViewProps) => (
<MotiView
state={state}
layout={
layout === false
@dblalock
dblalock / ML Meta-analyses.md
Last active November 28, 2023 14:50
List of meta-analyses / independent benchmarking of machine learning and data mining papers
@leopoldodonnell
leopoldodonnell / Readme.md
Last active October 10, 2024 09:40
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@sshongru
sshongru / stripAlphaChannelFromPNGs.sh
Last active May 4, 2025 19:01
Bash script to remove alpha channel from PNG files for submission to the Apple App Store
#!/bin/bash
echo ""
echo "----------"
echo "This bash script recursively goes through every PNG file in a given folder"
echo "and removes its alpha channel. This is useful for preparing PNG files for"
echo "uploading to Apple's iOS App Store."
echo ""
echo "You'll know you might need to use this script if you see this error coming"
echo "from Apple when you try to upload the images:"
@hteumeuleu
hteumeuleu / gmail-animation.html
Created April 26, 2018 13:49
The new Gmail loading animation is just HTML and CSS.
<style>
body{margin:0;width:100%;height:100%} body,td,input,textarea,select{font-family:arial,sans-serif} input,textarea,select{font-size:100%} #loading{position:absolute;width:100%;height:100%;z-index:1000;background-color:#fff} .msg{ color: #757575; font: 20px/20px Arial, sans-serif; letter-spacing: .2px; text-align: center } #nlpt{ animation: a-s .5s 2.5s 1 forwards; background-color: #f1f1f1; height: 4px; margin: 56px auto 20px; opacity: 0; overflow: hidden; position: relative; width: 300px } #nlpt::before{ animation: a-lb 20s 3s linear forwards; background-color: #db4437; content: ''; display: block; height: 100%; position: absolute; transform: translateX(-300px); width: 100% } @keyframes a-lb{ 0%{transform:translateX(-300px)}5%{transform:translateX(-240px)}15%{transform:translateX(-30px)}25%{transform:translateX(-30px)}30%{transform:translateX(-20px)}45%{transform:translateX(-20px)}50%{transform:translateX(-15px)}65%{transform:translateX(-15px)}70%{transform:translateX(-10px)}95%{transform:translateX(-1
@michaelgira23
michaelgira23 / stringToFromCharCode.js
Last active March 2, 2018 21:42
JavaScript string "obfuscator." CAUTION: *This is only a joke! Do not actually use!*
const string = process.argv.slice(2).join(' ');
let output = '';
string.split('').forEach((value, index) => {
if (index !== 0) {
output += ' + ';
}
output += `String.fromCharCode(${value.charCodeAt(0)})`
});
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active October 14, 2024 15:38
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@itod
itod / split_keyboards.md
Last active April 26, 2025 15:22
Every "split" mechanical keyboard currently being sold that I know of