Skip to content

Instantly share code, notes, and snippets.

View douglasjunior's full-sized avatar
:atom:
yarn start

Douglas Nassif Roma Junior douglasjunior

:atom:
yarn start
View GitHub Profile
/**
* Created by douglas on 02/05/16.
*/
public final class TooltipGenerator {
private Activity activity;
private Dialog dialog;
private Context context;
private List<SimpleTooltip> tooltips = new ArrayList<>();
@rbresjer
rbresjer / IOSWifiManager.h
Last active August 31, 2021 11:23
Programatically join Wi-Fi network on iOS with React Native wrapper for NEHotspotConfiguration
// Created by Rutger Bresjer on 10/10/2017
// Notes:
// - Be sure to enable "Hotspot Configuration" capability for the iOS target
// - Make sure the NetworkExtension framework is linked to the target
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
@interface IOSWifiManager : NSObject <RCTBridgeModule>
@ghostbear
ghostbear / Spotify - How to reduce and limit the cache size (Windows - Mac).md
Last active April 9, 2024 11:07
[Spotify] How to limit the cache size (Windows/Mac OS)

Credit to MadHatter

WINDOWS

Use your text editor of choice or if you don't have one use Windows Notepad
Opening with Notepad may or may not result in a fancy mess

  1. Close Spotify
  2. Open File Explorer and paste the following into the address bar %appdata%/Spotify¤
  3. Open the file named prefs with your text editor
  4. Change the numeric value following storage.size= . If storage.size= doesn't exist add it manually to the end of the file and assign numeric value. This value represents megabytes. One gigabyte equals 1024 megabytes. In the end, it should look something like this storage.size=1024
  5. Save the file
@bironeaj
bironeaj / recipe.sh
Last active April 13, 2024 03:26
Ubuntu IBM DB2 ODBC + CLI + PHP PDO Installation Instructions/Script - Tailored for Laravel Forge
# Install Dev Package
sudo apt install php7.2-dev
# CD Home
cd ~
# Get CLI
wget -q -O CLI.tar.gz https://iwm.dhe.ibm.com/sdfdl/v2/regs2/smkane/IDSOC/Xa.2/Xb.bL-snMrfTDtX6PgwwuXqAdeiFX6UY09DUuicweVTRlk/Xc.ibm_data_server_driver_for_odbc_cli_linuxx64_v11.1.tar.gz/Xd./Xf.LPr.D1vk/Xg.9810279/Xi.swg-idsoc97/XY.regsrvs/XZ.42v0ODLDocGa6RjgsAKBjJobG6U/ibm_data_server_driver_for_odbc_cli_linuxx64_v11.1.tar.gz
# Get PDO
wget -q -O PDO.tar.gz https://pecl.php.net/get/PDO_IBM-1.3.5.tgz
# Unpack Files & Cleanup
tar -zxf CLI.tar.gz
@douglasjunior
douglasjunior / config.fish
Last active October 28, 2019 13:30
Configure seu Fishshell para exibir informações sobre o repositório Git, assim como no Zsh.
set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set red (set_color red)
set gray (set_color -o black)
# Fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
@Kudo
Kudo / Steps_for_WebkitGTK_2_24_2.md
Last active September 5, 2023 10:16
Steps to integrate experimented JSC

Intro

Here are the steps to integrate experimented JavaScriptCore. Hopefully this could solve the JSC crash issue on RN 0.59.

Steps (for RN 0.59)

  1. yarn add 'jsc-android@next'
  2. Modify build.gradle files.
diff --git a/android/app/build.gradle b/android/app/build.gradle
@wesbos
wesbos / fake.js
Created September 16, 2020 15:26
fake-your-git-history.js
let currentColor = '#ebedf0';
let clicking = false;
const boxes = document.querySelectorAll('.js-calendar-graph-svg rect');
const graph = document.querySelector('.js-calendar-graph-svg');
// code for switching the current color
function handleColorChange(e) {
const el = e.currentTarget;
currentColor = el.style['background-color'];
console.log(currentColor)
@douglasjunior
douglasjunior / README.md
Last active July 6, 2022 12:04
Liberar espaço em disco no MacOS para desenvolvedores React Native
  1. Apagar node_modules, mas pra isso ser eficiente todos os seus projetos tem que estar dentro de uma mesma subpasta chamadas, exemplo: /home/user/projetos/.

Você entra na pasta /home/user/projetos/ pelo terminal e roda:

find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +

Se rodar esse comando em pasta errada pode acontecer dele apagar node_modules de dentro das pastas do NVM, ou alguma global, oq vai te forçar a reinstalar todas as versões do Node da sua máquina.

Apagar a pasta build dos projetos Android nativos, mesma regra aplicada ao node_modules: