Skip to content

Instantly share code, notes, and snippets.

@ubergoober
ubergoober / mousescrollreverse.ps1
Created January 3, 2024 07:32
Reverse Windows Mouse Scroll
$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" }
@ubergoober
ubergoober / inventory.md
Last active December 17, 2023 00:02
IKEA Delivery Inventory

Received in full

  1. SEKTION - Suspension Rail

    • Price: $19.05
    • Article Number: 602.615.27
    • Qty: 6
  2. ENKÖPING - Door

    • Price: $73.04
  • Article Number: 305.059.56
@ubergoober
ubergoober / helpers.js
Created June 24, 2016 07:07
Quick and dirty nodejs helper module.
'use strict';
var helpers = {};
/**
* Execute function asynchronously
* @param fn : function to execute async
* @param cb : callback to call if provided
*/
helpers.async = function(fn, cb) {
When you get an error code in with the domain kCFStreamErrorDomainSSL, you can generally find the error codes in SecureTransport.h which is in /System/Library/Frameworks/Security.framework. Here are the error codes:
enum {
errSSLProtocol = -9800, /* SSL protocol error */
errSSLNegotiation = -9801, /* Cipher Suite negotiation failure */
errSSLFatalAlert = -9802, /* Fatal alert */
errSSLWouldBlock = -9803, /* I/O would block (not fatal) */
errSSLSessionNotFound = -9804, /* attempt to restore an unknown session */
errSSLClosedGraceful = -9805, /* connection closed gracefully */
errSSLClosedAbort = -9806, /* connection closed via error */
@ubergoober
ubergoober / JSONObject.cs
Created April 14, 2016 13:09 — forked from bingomanatee/JSONObject.cs
the JSONObject component. Taken from the Unity Wiki
#define PRETTY //Comment out when you no longer need to read JSON to disable pretty print system-wide
#define USEFLOAT //Use floats for numbers instead of doubles (enable if you're getting too many significant digits in string output)
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/*
* http://www.opensource.org/licenses/lgpl-2.1.php
* JSONObject class
@ubergoober
ubergoober / DefaultKeyBinding.dict
Created March 31, 2016 16:56
OSX Home/End remapping
{
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
}

##The Alpha M. Eating Plan Credits/Source: Aaron Marino, iamalpham.com. Documenting here for prosperity. At the time this was posted, this text is freely available on his web site.

The strategy is pretty straight-forward. Follow the formula by picking items and portions from the appropriate categories. Your metabolism will get rolling. If you feel you need more food, simply increase portion size.

######Beverage:

  • Water
@ubergoober
ubergoober / findValueInArrayOfObjects.js
Last active February 3, 2016 17:47
Check if value for a key exists in an array of objects.
var arrayOfObjects = [{key1: 'foo1', key2: 'bar1'}, {key1: 'foo2', key2: 'bar2'}];
var keyNameToCheck = "key1";
var valueToFind = 'foo1';
function doesArrayOfObjectsContainValueForKey(array, keyName, value){
var res = array.filter(function(obj){
return obj[keyName] === value;
});
return res.length === 0 ? false : true;
@ubergoober
ubergoober / README.md
Created October 13, 2015 19:34 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@ubergoober
ubergoober / prettyJSON
Created September 15, 2015 17:12
Convert ugly json to pretty json using nodejs commandline.
# reference stackoverflow : http://stackoverflow.com/questions/352098/how-can-i-pretty-print-json
node -e "console.log(JSON.stringify(JSON.parse(require('fs').readFileSync(process.argv[1])), null, 4));" [FILENAME]