Skip to content

Instantly share code, notes, and snippets.

View Eric013's full-sized avatar

Sanchez Eric Eric013

View GitHub Profile
@Eric013
Eric013 / react-native-apple-m1.md
Created December 1, 2022 20:58 — forked from badsyntax/react-native-apple-m1.md
Some tips to working with react-native 0.64 on an Apple M1 Silicon chip

My env:

  • cocoapods 1.10.1
  • xcode 12.4
  • macos big sur 11.2.3
  • react-native 0.64

iOS

The iOS simulator build won't "just work". If you get errors like ld: library not found for... or swift compiler errors, then you need to disable arm64 for the simulator build.

@Eric013
Eric013 / git_tips
Created November 14, 2022 14:49 — forked from juliosaraiva/git_tips
How to modify a specified commit?
You can use git rebase. For example, if you want to modify commit bbc643cd, run
$ git rebase --interactive 'bbc643cd^'
Please note the caret ^ at the end of the command, because you need actually to rebase back to the commit before
the one you wish to modify.
In the default editor, modify pick to edit in the line mentioning 'bbc643cd'.
Save the file and exit: git will interpret and automatically execute the commands in the file. You will find yourself
@Eric013
Eric013 / iterm2-solarized.md
Created August 14, 2022 16:58 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@Eric013
Eric013 / add-update-github-access-token-on-mac.md
Created October 20, 2021 11:53 — forked from jonjack/add-update-refresh-github-access-token-on-mac.md
Adding & Updating GitHub Access Token on Mac

As outlined here, there are a couple of situations where you may want/need to authenticate with GitHub by using an Access Token:-

  1. If you have Two-Factor Authentication (2FA) enabled.
  2. You are accessing an organisations protected content using SAML Single-Sign On (SSO).

Using an Access Token for the first time

Create an Access Token

In your GitHub account, go to Settings / Developer settings / Personal access tokens and select Generate New Token. Make a note of the token somewhere safe since this is the only chance you get to see it.

@Eric013
Eric013 / React Native Clear Cache
Created May 8, 2021 13:45 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@Eric013
Eric013 / css_path.js
Created March 9, 2020 06:59 — forked from asfaltboy/css_path.js
Get Element CSS Selector
/*
* Copyright (C) 2015 Pavel Savshenko
* Copyright (C) 2011 Google Inc. All rights reserved.
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
* Copyright (C) 2009 Joseph Pecoraro
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@Eric013
Eric013 / encoding-video.md
Created January 7, 2019 11:02 — forked from Vestride/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@Eric013
Eric013 / using-eslint-with-prettier.md
Created March 16, 2018 08:52 — forked from yangshun/using-eslint-with-prettier.md
Comparison between tools that allow you to use ESLint and Prettier together.
prettier-eslint eslint-plugin-prettier eslint-config-prettier
What it is A JavaScript module exporting a single function. An ESLint plugin. An ESLint configuration.
What it does Runs the code (string) through prettier then eslint --fix. The output is also a string. Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb.
How to use it Either calling the function in your code or via [prettier-eslint-cli](https://github.co
@Eric013
Eric013 / raspberry_fast_capture.py
Created February 17, 2018 23:20 — forked from CarlosGS/raspberry_fast_capture.py
Fast reading from the raspberry camera with Python, Numpy, and OpenCV. See the comments for more details.
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera)
#
# Made by @CarlosGS in May 2017
# Club de Robotica - Universidad Autonoma de Madrid
# http://crm.ii.uam.es/
# License: Public Domain, attribution appreciated
import cv2
import numpy as np