Skip to content

Instantly share code, notes, and snippets.

View gwendall's full-sized avatar
🏠
Working from home

gwendall gwendall

🏠
Working from home
View GitHub Profile
@adrienjoly
adrienjoly / before-deleting-a-local-git-repository.sh
Last active December 5, 2021 11:13
Commands to run in order to make sure that you're not going to delete changes or files that were not pushed yet to your remote git repository.
git fetch
echo "\nStashes:"
git stash list | cat
echo "\nLocal branches + their associated remote:"
git branch -vv | cat
echo "\nCommits not yet pushed, from all branches that are already on remote:"
git log --branches --not --remotes | cat
@actuosus
actuosus / @react-native-firebase+messaging+6.4.0.patch
Created April 23, 2020 20:00
React Native Firebase Messaging Patch to use with patch-package when `mutable-content` is number or string
diff --git a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
index 18d69d9..8685051 100644
--- a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
+++ b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
@@ -113,7 +113,7 @@ + (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo {
}
// message.mutableContent
- if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] isEqualToString:@"1"]) {
+ if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] intValue] == 1) {

How to disable page caching with create-react-app

If you currently not using a service worker resulting in old production caches being used and users not getting new versions of the app.

src/index.js

Use:

import { unregister as unregisterServiceWorker } from './registerServiceWorker'
@knowbody
knowbody / ex-navigation.md
Last active July 17, 2023 10:14
My exponent's ex-navigation docs/thoughts

Exponent - ex-navigation

This is for now, for my personal use only, things might not be correctly explained here. For the official docs please check: https://github.com/exponentjs/ex-navigation/blob/master/README.md

Navigation bar configuration

On every screen you can use the built-in navigation bar, you can add a title, left button, right button or change navigation bar’s style. All you need to do is pass appropriate params to navigationBar in the route configuration:

import React, { Component } from 'react';
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@iansltx
iansltx / _safari-iframe-cookie-workaround.md
Last active April 7, 2024 15:44
Safari iframe cookie workaround
@bitinn
bitinn / README.md
Last active September 21, 2023 20:36
A soft-fullscreen prompt for iOS7+

A soft-fullscreen prompt for iOS7+

Background

iOS 7.0 and iOS 8 (Beta) do not have support for minimal-ui viewport keyword, nor do they response to window.slideTo(0,1) or support Fullscreen API, which means there is no easy way to tell Mobile Safari to hide address bar/menu without user interaction.

This is a problem for Web App that mimics Native App design, where html/body are commonly set to height: 100%, so browser viewport = available screen estate. There are currently no solution besides adding apple-mobile-web-app-capable meta and ask users to manually Save to Homescreen.

Frustrated by this limit, we present a soft-fullscreen prompt design, which, coupled with proper CSS hack, can achieve soft-fullscreen with relatively small effort from users.

@frozeman
frozeman / gist:88a3e47679dd74242cab
Last active August 29, 2015 14:01
Meteor minimongo: Insert and Remove in bulk using an array
/*
These two functions provide a simple extra minimongo functionality to add and remove documents in bulk,
without unnecessary re-renders.
The process is simple. It will add the documents to the collections "_map" and only the last item will be inserted properly
to cause reactive dependencies to re-run.
*/
Models = {};
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@rtt
rtt / tinder-api-documentation.md
Last active May 5, 2024 15:28
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)