Skip to content

Instantly share code, notes, and snippets.

@GollyJer
GollyJer / app.config.ts
Last active December 9, 2024 14:15
app.config.ts
import { ConfigContext } from '@expo/config';
// eslint-disable-next-line no-console
// console.log('ENV', process.env);
// expands type in the vscode tooltip.
type ExpandTooltip<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
const EXPO_SDK = '51';
const BINARY_ITERATION_FOR_SDK = '1'; // start with 1. CAN NOT BE 0.
@shawonis08
shawonis08 / Oracle Attach_BLOCK_Volume_Instance.md
Last active June 14, 2025 19:01
This readme provides a step-by-step guide for attaching an Oracle Block Volume to an instance and creating a partition, file system, and mounting the file system. It also includes instructions for updating the /etc/fstab file to automatically mount the disk when the system boots, rebooting the instance, and checking the file system. The guide al…

Oracle Attach BLOCK Volume to Instance

  • Creating a partition with fdisk
  • Creating an ext3 file system
  • Mounting the file system
  • Updating the /etc/fstab file
  • Rebooting the instance
  • Checking the file system

Preparation

@nandorojo
nandorojo / knew.md
Last active May 12, 2025 20:08
What I wish I knew when I started with Expo Web, React Navigation & Next.js

I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.

Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.

It's gotten to the point where I find my own answers from 6 months before on certain Github issues.

I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.

I have made libraries to address a number of the topics here, from navigation to design.

@ctrlplusb
ctrlplusb / findManyCursor.test.ts
Last active February 18, 2022 17:22
Utility to provide Relay Cursor Connection Specification support to Prisma Framework
import { Country, Photon } from '@prisma/photon';
import { findManyCursor } from './findManyCursor';
const photon = new Photon();
let data: Country[];
const createCountry = async (id: string) => photon.countries.create({
data: {
id,
# ---- Base Node ----
FROM mhart/alpine-node:10 AS base
# install node
RUN apk add --no-cache nodejs-current
# set working directory
WORKDIR /root/nextApp
# copy project file
COPY package.json .
COPY tsconfig.server.json .
COPY .npmrc .
@fnky
fnky / hooks.js
Last active January 7, 2024 12:32
React Hooks: useReducer with actions and selectors (Redux-like)
function useSelectors(reducer, mapStateToSelectors) {
const [state] = reducer;
const selectors = useMemo(() => mapStateToSelectors(state), [state]);
return selectors;
}
function useActions(reducer, mapDispatchToActions) {
const [, dispatch] = reducer;
const actions = useMemo(() => mapDispatchToActions(dispatch), [dispatch]);
return actions;
@shortjared
shortjared / list.txt
Last active June 26, 2025 12:00
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@Malvineous
Malvineous / google-authenticator.sh
Created October 1, 2017 09:11
Shell script to generate Google Authenticator codes
#!/bin/sh
# This is the path to the Google Authenticator app file. It's typically located
# in /data under Android. Copy it to your PC in a safe location and specify the
# path to it here.
DB="/path/to/com.google.android.apps.authenticator/databases/databases"
sqlite3 "$DB" 'SELECT email,secret FROM accounts;' | while read A
do
NAME=`echo "$A" | cut -d '|' -f 1`
@kangks
kangks / postgres96Ec2.json
Last active January 17, 2019 09:25
AWS Cloudformation for Ec2 with Postgres 96
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Create Linux EC2 with postgresql96",
"Metadata": {
"Comment": "Postgres 9.6 on a r3.8xlarge + 20G EBS in a privateSubnet, and pgbench in publicSubnet"
},
"Parameters": {
"Ec2KeyNameParam": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "AWS::EC2::KeyPair::KeyName",
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Oceanic Next Color Scheme/Oceanic Next.tmTheme",
"draw_white_space": "all",
"font_face": "Fira Mono",
"font_size": 20,
"tab_size": 2,
"theme": "Brogrammer.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,