Skip to content

Instantly share code, notes, and snippets.

View adriangl's full-sized avatar
💻
Back to work!

Adrián García adriangl

💻
Back to work!
View GitHub Profile
@gagarine
gagarine / win11-mouse-scroll-reverse.md
Last active September 10, 2024 15:29
Reverse Mouse Wheel scroll in Windows 11 (Natural Mode like MacOS)

Reverse Mouse Wheel scroll in Windows 11

Chose between natural mode like MacOS or Windows default mode.

Step 1: Open Windows PowerShell in Administrator Mode.

You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.

Step 2: Copy the following code and paste it in the command line of Windows PowerShell:

$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
@yamidragut
yamidragut / ListAdapterTemplate
Last active March 17, 2020 20:30
RecyclerView ListAdapter with androidx and binding based in the one of Arif Khan: https://android.jlelse.eu/recylerview-list-adapter-template-in-kotlin-6b9814201458
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
class ${NAME}(private val onItemClickListener: (${Model_Class}) -> Unit) :
ListAdapter<${Model_Class}, ${NAME}.ItemViewHolder>(DiffCallback()) {
@jpickwell
jpickwell / README.md
Last active September 18, 2020 05:09
Remove old casks from Homebrew-Cask.
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@imartinez
imartinez / Bugsnag Error Widget for Dashing.md
Last active July 29, 2016 08:02
Bugsnag Error Widget for Dashing

#Bugsnag Error Widget for Dashing.io

Dashing Widget for displaying Bugsnag errors count. Supports any number of bugsnag projects and error configurations.

Preview

##Usage

To use this widget you have two options:

@imartinez
imartinez / Google Play Reviews Widget for Dashing.md
Last active February 28, 2017 09:02
Google Play Reviews Widget for Dashing
@imartinez
imartinez / Google Play Rating Widget for Dashing.md
Last active February 22, 2017 05:38
Google Play Rating Widget for Dashing
@rocboronat
rocboronat / PermissionGranter.java
Last active December 26, 2022 07:05
Tap the "allow" button while running an Android instrumental test using UIAutomator
package com.fewlaps.android.permissiongranter;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
import android.support.v4.content.ContextCompat;
@danielgallegovico
danielgallegovico / Triple.java
Last active June 16, 2016 11:01
Container to ease passing around a tuple of three objects.
/*
* Copyright (C) 2016 Daniel Gallego Vico.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@blacklee
blacklee / ffmpeg-to-480p.sh
Created February 19, 2016 13:43
ffmpeg convert video to 480p
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4