Skip to content

Instantly share code, notes, and snippets.

View gugadev's full-sized avatar
🌐
Web & Mobile

Gustavo García gugadev

🌐
Web & Mobile
View GitHub Profile
@gugadev
gugadev / discord-enable-native-title-bar.md
Created January 16, 2025 19:00 — forked from Soapbosnia/discord-enable-native-title-bar.md
Enabling native title bar on Discord client

Enabling native title bar on Discord client

  • Step 1: Download 7-ZIP and the ASAR plugin from [ https://www.tc4shell.com/en/7zip/asar/ ]
  • Step 2: After installing 7-ZIP create a new folder inside of its install location called Formats
  • Step 3: Extract the .dll from one of the folders in the archive (x64 or 32) to the Formats folder
  • Step 4: Go to C:\Users\**YourUsername**\AppData\Local\Discord\app-1.0.9007\modules\discord_desktop_core-1\discord_desktop_core (Replace **YourUsername** with your username)
  • Step 5: Open the core.asar file with 7-ZIP and extract its content to a folder of your choice
  • Step 6: Enter the folder and go to the app subdirectory, after that find the file called mainWindow.js or mainScreen.js and open it with a text editor of your choice
  • Step 7: Go to line 419 and change frame: false to frame: true, if you can't find that text press CTRL+F and search for frame: false, it should look like the one attached in the screens
@gugadev
gugadev / install-android-sdk-windows.md
Last active March 8, 2025 16:15
Install SDK on Windows [without AndroidStudio]

Android SDK setup - Windows guide

If you are a React Native, NativeScript, Flutter or Ionic developer maybe you don't want to install the entire Android Studio just to have your environment ready. If this is your case, this guide will help you to setup your minimal Android SDK environment in Windows.


@gugadev
gugadev / http.ts
Created July 15, 2023 21:54
Small utility to remote data fetching using polymorfism to allow distinct implementations.
/**
* @description Constituye un catálogo de errores de una API.
* Un catálogo es un mapa en donde se asocia un código de error
* con un mensaje describiendo el problema que se ha originado.
* Por ejemplo:
* {
* 24323: 'Ha ocurrido un error consumiendo el servicio externo ABC',
* 13424: 'No se encontraron coincidencias para la búsqueda'
* }
*/
import 'package:flutter/material.dart';
class BottomNavigation extends StatefulWidget<_BottomNavigationState> {
BottomNavigation({
this.children,
this.items,
this.fadeDuration
});
final List<Widget> children;
final List<Widget> items;
@gugadev
gugadev / macOS Internals.md
Created May 12, 2023 13:11 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@gugadev
gugadev / fetch-response-interceptor.ts
Last active February 26, 2023 14:01
Small proxy based interceptor for fetch. Currently works with Response.prototype.text, Response.prototype.json, Response.prototype.blob and Response.prototype.arrayBuffer.
type InterceptorResponse = Omit<
typeof Response.prototype,
'text' | 'formData' | 'blob' | 'json' | 'arrayBuffer'
>
type FetchInterceptorResponseConfig = {
onUnauthenticated?: (obj: InterceptorResponse) => void
onInternalError?: (obj: InterceptorResponse) => void
onForbidden?: (obj: InterceptorResponse) => void
onRateLimit?: (obj: InterceptorResponse) => void
@gugadev
gugadev / tw-unfollower.js
Created December 9, 2022 00:10
Tiny script to unfollow all people you're following. Just go to https://twitter.com/<youruser>/following, open the console and run the code (testing in responsive mode).
function unfollow() {
let count = 0
const buttons = document.querySelectorAll('[data-testid*="-unfollow"]')
if (!buttons.length) {
console.log(`${count} People unfollowed`)
return
}
const waitFor = (ms) => new Promise(resolve => setTimeout(resolve, ms))
@gugadev
gugadev / sw-service.ts
Last active April 12, 2022 04:17
Vanilla Service Worker
export function register() {
if ("serviceWorker" in navigator) {
return new Promise((resolve) => {
navigator.serviceWorker.register("/sw.js")
.then((registration) => {
registration.onupdatefound = () => {
const worker = registration.active;
if (worker == null) {
return;
}
@gugadev
gugadev / build-sw.js
Last active April 9, 2022 22:47
Service worker examples in TypeScript and JavaScript
/**
* * This is not in use.
* * Para conocimiento general:
* Esta es una forma de generar el "precache manifest"
* de un service worker. La otra forma es como se detalla
* en el script de NPM "sw" en el presente package.json.
*/
const workboxBuild = require("workbox-build");
const buildServiceWorker = () => {
@gugadev
gugadev / legacy.json
Created January 25, 2022 18:33
Migration of the REST payload from legacy to v1 - FCM
{
"to": "token o topic",
"priority": "high",
"notification": {
"title": "Title of the notification",
"body": "Description of the notification",
"android_channel_id": "Android channel"
},
"data": {