Skip to content

Instantly share code, notes, and snippets.

View janziemba's full-sized avatar
👋

Jan Ziemba janziemba

👋
View GitHub Profile
import React, { useState } from 'react';
import { Pressable, Text } from 'react-native';
import Animated, { css } from 'react-native-reanimated';
export default function ParticleButton() {
const [pressed, setPressed] = useState(false);
const [showParticles, setShowParticles] = useState(false);
return (
<Pressable
@rvibit
rvibit / ProPlanCard.tsx
Created January 6, 2025 15:22
ProPlanCard with animated sparkles
import React from 'react';
import { View, Text, StyleSheet, Pressable, Dimensions } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
import Animated, {
useAnimatedStyle,
withSpring,
withRepeat,
withSequence,
useSharedValue
} from 'react-native-reanimated';
@Saadnajmi
Saadnajmi / Ripple.tsx
Created December 29, 2024 06:31
Ripple Effect Shader with react-native-skia
import { Canvas, Circle, Group, Rect, Shader, Skia, useClock, RuntimeShader, SkRuntimeEffect, RoundedRect } from "@shopify/react-native-skia";
import { SafeAreaView, StyleSheet } from "react-native";
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
const styles = StyleSheet.create({
centered: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
@rs77
rs77 / google-sheets-multi-select-dropdown.js
Last active February 14, 2023 14:23
Google App Script to enable users on a Google Sheet to select multiple options on a dropdown menu. Demonstration and more information here: https://scripteverything.com/google-sheets-drop-down-list-multiple-select/
/**
* @param {SheetsOnEdit} e - edit event object
*/
function onEdit(e) {
/**
* @typedef {Object} MultiDropDown
* @property {String} namedRange
* @property {Number} handlingDuplicates
* @property {String} separator
* @property {Boolean} sortResult
@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:
@RobertFischer
RobertFischer / Description.md
Last active October 14, 2023 16:47
Benchmarking is Hard, Yo.

So, I was reading Why You shouldn’t use lodash anymore and use pure JavaScript instead, because once upon a time, I shifted from Underscore to Lodash, and I'm always on the lookout for the bestest JavaScript stdlib. At the same time, there was recently an interesting conversation on Twitter about how some of React's functionality can be easily implemented in modern vanilla JS. The code that came out of that was elegant and impressive, and so I have taken that as a message to ask if we really need the framework.

Unfortunately, it didn't start out well. After copy-pasting the ~100 lines of code that Lodash executes to perform a find, there was then this shocking claim: Lodash takes 140ms, and native find takes 0ms.

@akvsh-r
akvsh-r / podforceupdate.sh
Created March 18, 2018 09:49 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@janziemba
janziemba / AppDelegate.m
Last active April 18, 2020 08:35
React Native - use launch image as app background on iOS
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"Reservio"
initialProperties:nil
launchOptions:launchOptions];
@juanpablocs
juanpablocs / valid_email.md
Last active March 10, 2021 02:32
SImple Regex for valid email with Javascript
@jacks205
jacks205 / RNMultipleTargetsInstructions.md
Last active December 5, 2024 19:48
Settings up multiple app targets in React-Native