Skip to content

Instantly share code, notes, and snippets.

View ericoloewe's full-sized avatar

Érico De Souza Loewe ericoloewe

View GitHub Profile
@vuon9
vuon9 / README.md
Last active January 18, 2026 21:55
Powertoys - Keyboard Manager - Common macOS keys mapping

How to install

  • cd C:\Users\${username}\AppData\Local\Microsoft\PowerToys\Keyboard Manager
  • Backup file existing one of default.json
  • Download default.json and add it to the current folder

Mapped keys

key
Esc
@tanaikech
tanaikech / submit.md
Last active April 5, 2024 17:14
Simple Script of Resumable Upload with Google Drive API for Axios

Simple Script of Resumable Upload with Google Drive API for Axios

This is a simple sample script for achieving the resumable upload to Google Drive using Axios. In order to achieve the resumable upload, at first, it is required to retrieve the location, which is the endpoint of upload. The location is included in the response headers. After the location was retrieved, the file can be uploaded to the location URL.

In this sample, a text data is uploaded with the resumable upload using a single chunk.

Upload Data using Single Chunk

This sample script achieves the resumable upload using a single chunk.

Sample script

@rozputnii
rozputnii / EF Core. Override SaveChanges
Created September 25, 2018 09:53
.Net Core EF - Override DbContext.SaveChanges and apply additional checks
public override int SaveChanges(bool acceptAllChangesOnSuccess)
{
OnBeforeSaving();
return base.SaveChanges(acceptAllChangesOnSuccess);
}
public override Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess,
CancellationToken cancellationToken = new CancellationToken())
{
OnBeforeSaving();
@moshemal
moshemal / App.jsx
Last active November 9, 2023 00:26
Debug react-router routings
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Login from 'components/Login'
import DefaultComponent from 'components/DefaultComponent'
class DebugRouter extends Router {
constructor(props){
super(props);
console.log('initial history is: ', JSON.stringify(this.history, null,2))
this.history.listen((location, action)=>{
@guilhermemarconi
guilhermemarconi / deleteAddress.js
Last active June 20, 2024 02:11
Deal with User Profile and User Addresses in VTEX
fetch(`/no-cache/postalcode/address/delete/${addressName}`, {
credentials: 'same-origin',
})
.then(res => res.json())
.then(addressData => {
// ...
})
@guilhermemarconi
guilhermemarconi / gist:b20b835d552ccaf63f8d0127f0f283d3
Last active January 4, 2019 20:43
Endpoint para buscar, externamente, os pedidos de um usuário específico na VTEX
/api/checkout/pub/orders/?customerEmail=${email}
@rdakar
rdakar / Validação de CPF e CNPJ - C#
Created August 14, 2017 21:02
Validação de CPF e CNPJ - C#
namespace CpfCnpj
{
public static class CpfCnpjUtils
{
public static bool IsValid(string cpfCnpj)
{
return (IsCpf(cpfCnpj) || IsCnpj(cpfCnpj));
}
private static bool IsCpf(string cpf)
@ctrl-freak
ctrl-freak / android-adb-pull-apk.md
Last active March 5, 2026 10:34
Retrieve APK from Non-Rooted Android Device through ADB

https://stackoverflow.com/a/18003462/348146

None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:

  1. Determine the package name of the app, e.g. com.example.someapp. Skip this step if you already know the package name.

    adb shell pm list packages

    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

@PurpleBooth
PurpleBooth / README-Template.md
Last active March 19, 2026 23:12
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites