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
//
// AsyncTask.swift
//
// Created by Douglas Nassif Roma Junior on 08/06/15.
// Copyright (c) 2015 Douglas Nassif Roma Junior. All rights reserved.
//
import Foundation
class AsyncTask<Params, Progress, Result> : NSObject {
/**
* 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<>();
@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'
@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>
@douglasjunior
douglasjunior / TUTORIAL_LETSENCRYPT_GLASSFISH4.md
Last active February 24, 2022 17:15
Tutorial de instalação do Lets Encrypt no Glassfish 4.x

Tutorial de instalação do Lets Encrypt no Glassfish 4.x

Gerando certificado Lets Encrypt

Para gerar o certificado Lets Encrypt é muito simples, aqui as instruções estão baseadas em um tutorial publicado pela Locaweb. (Web archive)

Primeiro vamos criar um diretório para isso:

@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:

@dchowitz
dchowitz / es6-debugging-in-vscode.md
Last active August 30, 2023 06:23
Debugging ES6 in VS Code

Debugging ES6 in VS Code

My current editor of choice for all things related to Javascript and Node is VS Code, which I highly recommend. The other day I needed to hunt down a bug in one of my tests written in ES6, which at time of writing is not fully supported in Node. Shortly after, I found myself down the rabbit hole of debugging in VS Code and realized this isn't as straightforward as I thought initially. This short post summarizes the steps I took to make debugging ES6 in VS Code frictionless.

What doesn't work

My first approach was a launch configuration in launch.json mimicking tape -r babel-register ./path/to/testfile.js with babel configured to create inline sourcemaps in my package.json. The debugging started but breakpoints and stepping through the code in VS Code were a complete mess. Apparently, ad-hoc transpilation via babel-require-hook and inline sourcemaps do not work in VS Code. The same result for attaching (instead of launch) to `babel-node

@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
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;