Skip to content

Instantly share code, notes, and snippets.

View JCMais's full-sized avatar
🚀
Being Happy

Jonathan Cardoso JCMais

🚀
Being Happy
View GitHub Profile
@JCMais
JCMais / setup-claude-chrome-wsl.sh
Created June 6, 2026 15:39 — forked from bgr/setup-claude-chrome-wsl.sh
Make claude --chrome work from WSL2 with Windows Chrome
#!/bin/bash
# Enables `claude --chrome` to work from WSL2 with Windows-installed Chrome
# Run this from inside your WSL2 distro
#
# This script was written by Claude, see the following link for more info:
# https://github.com/anthropics/claude-code/issues/14367#issuecomment-3927349991
#
# The script will:
# - Auto-detect Windows username, WSL distro, Chrome profile, and claude binary
# - Create the real directory + Extensions symlink for detection
@JCMais
JCMais / MutationUtils.js
Created March 20, 2018 18:07 — forked from sibelius/MutationUtils.js
Helper methods for Relay Modern updater
// @flow
import { ConnectionHandler } from 'relay-runtime';
import { isObject, isArray } from 'lodash/fp';
export function listRecordRemoveUpdater({ parentId, itemId, parentFieldName, store }) {
const parentProxy = store.get(parentId);
const items = parentProxy.getLinkedRecords(parentFieldName);
parentProxy.setLinkedRecords(items.filter(record => record._dataID !== itemId), parentFieldName);
}
@JCMais
JCMais / MutationUtils.js
Created March 20, 2018 18:07 — forked from sibelius/MutationUtils.js
Helper methods for Relay Modern updater
// @flow
import { ConnectionHandler } from 'relay-runtime';
import { isObject, isArray } from 'lodash/fp';
export function listRecordRemoveUpdater({ parentId, itemId, parentFieldName, store }) {
const parentProxy = store.get(parentId);
const items = parentProxy.getLinkedRecords(parentFieldName);
parentProxy.setLinkedRecords(items.filter(record => record._dataID !== itemId), parentFieldName);
}
@JCMais
JCMais / learning.md
Last active April 26, 2017 01:20 — forked from sibelius/learning.md
Learning Path React Native

Basics

  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation

@JCMais
JCMais / LICENSE.txt
Created July 7, 2012 22:36 — forked from LeverOne/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@JCMais
JCMais / README
Created February 22, 2012 18:37 — forked from joelambert/README
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
Array.prototype.duplicates = function ( ) {
return this.filter ( function ( x , y , k ) {
return y !== k.lastIndexOf ( x );
});
};
Array.prototype.hasDuplicates = function ( ) {
var me = this;
return me.some ( function ( idx ) {
return me.indexOf( idx ) !== me.lastIndexOf ( idx );