Skip to content

Instantly share code, notes, and snippets.

View alexlevy0's full-sized avatar
🎯
顺其自然

Alex Lévy alexlevy0

🎯
顺其自然
View GitHub Profile
@aws-amplify-ops
aws-amplify-ops / cleanup-steps.md
Last active August 31, 2023 19:51
Steps for cleaning user data for owner based auth schema

Who is this Gist for?

This Gist demonstrates an approach to removing a specific user's data from an Amazon DynamoDB table that was created as an AWS AppSync data source. It may be helpful for those who need to remove records that are associated with a Cognito User that will be deleted from their Cognito User Pool.

Steps to clean up user data

Clean up user data with DataStore disabled (conflict resolution disabled)

Assuming you have this schema

@silverwolfdoc
silverwolfdoc / index.html
Created June 18, 2021 07:04
tailwind Blurry gradient animated
<div class="flex items-center justify-center min-h-screen bg-gray-50">
<div class="relative w-full max-w-lg">
<div
class="absolute rounded-full animate-blob mix-blend-multiply filter blur-2xl opacity-70 -top-5 -right-2 w-72 h-72 bg-yellow-500"
/>
<div
class="absolute rounded-full animate-blob animation-delay-2000 mix-blend-multiply filter blur-2xl opacity-70 top-0 -left-2 w-72 h-72 bg-indigo-500"
/>
<div
@arabold
arabold / useDataStoreQuery.tsx
Last active February 23, 2023 18:07
Simplify querying the Amplify DataStore using React hooks
import {
DataStore,
PersistentModel,
PersistentModelConstructor,
ProducerModelPredicate,
SortPredicate,
ProducerPaginationInput
} from '@aws-amplify/datastore'
import { useCallback, useEffect, useState } from 'react'
@vaderj
vaderj / Alternative_Excel_Unlock
Last active June 8, 2021 02:32
#VBA Two methods of unlocking a locked excel sheet:VBA macro for Excel that should unprotect a password protected sheet,Opening the spreadsheet as XML and removing the specific piece
Step 1. Make a copy of the spreadsheet in an empty directory. Rename the extension to .zip
Step 2. Extract the zip file.
Step 3. In the extracted contents, goto the folder \xl\worksheets\
Step 4. There should be one xml file per sheet? I editing "sheet1.xml" with NotePad++. From nearly the very end of the file, remove the tag that starts with:
<sheetProtection
My entire tag was as follows:
<sheetProtection algorithmName="SHA-512" hashValue="ALciNBSIqRcjDiFbCuyWoGk4iOcC/ZRKnEjwEVi1skb6G5JbHhp+QVZ9+rlPVbGILOS7lYiCvJmR4Q7IuSphXA==" saltValue="8OVKXrG0VacLOLVztUpEYw==" spinCount="100000" sheet="1" objects="1" scenarios="1" selectLockedCells="1"/>
Step 5. Save the file. Open the ZIP file in 7zip, find the same file, drag and drop, save, exit, rename the file back to (xlsx) and open
@Hyra
Hyra / add-panresponder.js
Last active February 6, 2020 19:10
Getting started with the PanResponder in React Native
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
Image, // we want to use an image
PanResponder, // we want to bring in the PanResponder system
Animated // we wil be using animated value
} from 'react-native';
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a