Skip to content

Instantly share code, notes, and snippets.

@MediumOne
MediumOne / IntentLogger.java
Created September 21, 2017 10:46
Code to print/log contents of an Intent in Android
package com.example.test;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import java.util.Set;
import static android.content.Intent.URI_INTENT_SCHEME;
@arbourd
arbourd / invert.md
Created May 9, 2017 23:12
Invert Windows 10 mouse scroll wheel
  1. Open Powershell as an administrator
  2. Run
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
  3. Verify that all mice devices have had their FlipFlopWheel attributes set to 1
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0
  4. Reboot
@milolav
milolav / Portable_WhatsApp.md
Last active July 16, 2025 05:09
Making WhatsApp desktop application portable

Portable desktop WhatsApp

You start multiple instances of WhatsApp using --user-data-dir flag providing the full path to the directory. For example:

E:\Temp\Whatsapp>WhatsApp.exe --user-data-dir=E:\Temp\Whatsapp\number1

or by creating a shortcut with the flag.

@arebee
arebee / Search-FileIndex.ps1
Last active September 13, 2024 07:17
Use Windows Search from PowerShell
function Search-FileIndex {
<#
.PARAMETER Path
Absoloute or relative path. Has to be in the Search Index for results to be presented.
.PARAMETER Pattern
File name or pattern to search for. Defaults to no values. Aliased to Filter to ergonomically match Get-ChildItem.
.PARAMETER Text
Free text to search for in the files defined by the pattern.
.PARAMETER Recurse
Add the parameter to perform a recursive search. Default is false.
@akaleeroy
akaleeroy / _goto-opened-folders.md
Last active April 16, 2025 16:26
Easy Access to Currently Opened Folders

Easy Access to Currently Opened Folders

Windows Enhancement Productivity AutoHotkey v2

Enhance Open... or Save As... dialogs with a quick way to navigate to currently opened folders.

Easy Access to Currently Opened Folders v2 - Demo

This is an AutoHotkey v2 script that gives common file selection dialogs an extra feature: middle-clicking invokes a menu of currently opened folders. Say you want to save or upload something to/from a folder you've got open in Windows Explorer. The dialog box pops up with the last folder (from another project) or My Documents, and now you have to manually navigate to the folder you want, or copy-paste its path from the open Explorer window. I wanted to get to the active locations quicker. Recent Items wasn't exactly helping, so I made this by forking [FavoriteFolders.

#lang racket
;; A solver for the following puzzle:
;; Given 5 integers a, b, c, d, and e,
;; find an expression that combines a, b, c, and d with arithmetic operations (+, -, *, and /) to get e.
(require srfi/1)
(define ops '(+ - * /))
@Jwely
Jwely / download_ftp_tree.py
Last active March 4, 2024 11:39
recursive ftp directory downloader with python
import ftplib
import os
import re
"""
MIT license: 2017 - Jwely
Example usage:
``` python
import ftplib
@f0k
f0k / cuda_check.c
Last active July 1, 2025 23:23
Simple program to test whether nvcc/CUDA work
#include <stdio.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
/* Outputs some information on CUDA-enabled devices on your computer,
* including compute capability and current memory usage.
*
* On Linux, compile with: nvcc -o cuda_check cuda_check.c -lcuda
* On Windows, compile with: nvcc -o cuda_check.exe cuda_check.c -lcuda
*
@oculushut
oculushut / JGit
Last active March 20, 2020 19:25
Using JGit in Windows
1. Download jgit.sh from here: https://eclipse.org/jgit/download/
(Yes -> it's a file with a .sh extension and we want to work in Windows, but download it!)
2. Rename the downloaded file to something easier to deal with. E.g. "jgit.sh"
3. Create a new file called jgit.bat and stick it in the same folder as jgit.sh.
4. Type the following into the jgit.bat file:
@jmcmellen
jmcmellen / DASL Filter for Outlook.txt
Created March 11, 2016 20:12
Filter Outlook view to show only unread, flagged, or today's email
("urn:schemas:httpmail:read" = 0 OR "http://schemas.microsoft.com/mapi/proptag/0x10900003" > 1 OR
%today("urn:schemas:httpmail:datereceived")% )