Skip to content

Instantly share code, notes, and snippets.

View DerekFoulk's full-sized avatar

Derek Foulk DerekFoulk

View GitHub Profile
@benjamincharity
benjamincharity / autonomous.txt
Last active April 12, 2024 22:20
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@mcraz
mcraz / JavaScript - Center Popup
Created January 3, 2014 05:56
Create & Center Popup Windows (Also on dual monitor)
function PopupCenter(url, title, w, h) {
// Fixes dual-screen position Most browsers Firefox
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top;
width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
@tlinkner
tlinkner / Output Android Icons.jsx
Last active February 19, 2021 14:15
Photoshop script to output Android icons
// Output Android Icons.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Photoshop CS6. It outputs Android icons of the
// following sizes from a source PSD at least 512px x 512px
//
// store:
// Icon.png (512px x 512px)