Skip to content

Instantly share code, notes, and snippets.

View enestatli's full-sized avatar
💭
I may be slow to respond.

enestatli

💭
I may be slow to respond.
View GitHub Profile
@hirbod
hirbod / fix-react-native-rcthost-not-found.md
Last active June 18, 2025 21:17
React Native fix for libraries failing with ReactCommon/RCTHost.h not found - CNG - Config Plugin - Podfile fix

What

If you’re using Zeego or any other React Native library that throws weird framework-related errors like “ReactCommon/RCTHost.h not found”, this is for you. The issue started with RN 0.78+ and usually only affects the old architecture with useFrameworks: 'static'.

Versions before 0.78, setups without useFrameworks, or users on the new architecture are not affected, thus do not need this workaround.

Fix for Expo users

I’ve prepared a config plugin for you. Create a file, e.g. plugins/with-runtime-framework-headers.js, with the following contents:

const { withPodfile } = require('expo/config-plugins')
@Janiczek
Janiczek / 00_README.md
Last active July 18, 2025 21:43
Arturia Minilab 3 Sysex codes

Arturia Minilab 3 SysEx messages

I was mainly interested in finding out how to change pad colours.

There was this Github repo detailing some SysEx messages for Minilab 2, but that didn't work for Minilab 3.

In the end I downloaded the DAW integration scripts from the Resources page and decompiled the Bitwig Java classes (you need to unzip the .bwextension file). That gave me the coveted secret SysEx commands :)

Initialization

@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
function Favorite({
postId = null,
isLiked: _isLiked = false,
numberOfLikes: _numberOfLikes = 0,
}) {
const [isLiked, setIsLiked] = React.useState(_isLiked);
const [numberOfLikes, setNumberOfLikes] = React.useState(_numberOfLikes ?? 0);
const likeDebounceRef = React.useRef();
const lastIsLikedStateRef = React.useRef(_isLiked);
@danstepanov
danstepanov / .gitconfig
Last active April 18, 2023 19:58
Useful git aliases
[alias]
co = checkout
cob = checkout -b
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cm = !git add -A && git commit -m
bclean = "!f() { git branch --merged ${1-main} | grep -v "${1-main}$" | xargs git branch -d; }; f"
bdone = "!f() { git co ${1-main} && git up && git bclean ${1-main}; }; f"
po = push origin
st = status
undolastcommit = reset HEAD~
@ahartzog
ahartzog / uploadMultipart.native.ts
Created June 2, 2021 18:58
Alek's Multipart Upload
import apiFetch from 'modules/api-fetch';
import Toast from 'modules/toast/index.native';
import Sentry from 'modules/sentry';
const FILE_CHUNK_SIZE = 5242880;
const uploadMultipart = async (
file: string,
setIsUploading = (set: boolean) => {},
setUploadProgress = (set: number) => {},
@WTFox
WTFox / redditr.py
Created June 19, 2020 05:06
Python script to automate reddit posts
import time
import praw
USERNAME = ""
PASSWORD = ""
CLIENT_ID = ""
CLIENT_SECRET = ""
// This is a hack, a quick and dirty console script for RT/tweets (with replies) removal w/o API
// To be used in: https://twitter.com/Username/with_replies
// Set your username (without @) below (case-sensitive) to correctly trigger the right Menu
const tweetUser = 'Username'
// BUG, With above we still trigger Menu on some replies but relatively harmless.
// @Hack Implement simple has() for querySelector
const querySelectorHas = function( parent, child ){
@albertogalca
albertogalca / config.yml
Last active January 13, 2023 13:10
Circle CI Config for fastlane
version: 2
aliases:
- &restore_npm_cache
name: 'Restoring node_modules from the cache'
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
- &install_npm_dependencies
name: Installing NPM Dependencies
command: yarn install
- &save_npm_cache
@BrianCodeItUp
BrianCodeItUp / component.tsx
Last active May 12, 2022 06:43
useContext, useReducer with typescript
import React from 'react';
import { View, Text, Button } from 'react-native';
import styles from './styles'
import { ContextProvider, Context } from './context';
const Compo = () => {
const { type } = useContext(Context);
return (
<View style={styles.container}>
<Text>{type}</Text>