Skip to content

Instantly share code, notes, and snippets.

View JoelLisenby's full-sized avatar
🐳
sploosh

Joel Lisenby JoelLisenby

🐳
sploosh
View GitHub Profile
@louisremi
louisremi / animLoopX.js
Created July 29, 2011 17:34
Animation loop with requestAnimationFrame
// Cross browser, backward compatible solution
(function( window, Date ) {
// feature testing
var raf = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
window.animLoop = function( render, element ) {
var running, lastFrame = +new Date;
@localpcguy
localpcguy / swipeFunc.js
Created November 17, 2011 16:00
Simple Mobile Swipe function to get the swipe direction
var swipeFunc = {
touches : {
"touchstart": {"x":-1, "y":-1},
"touchmove" : {"x":-1, "y":-1},
"touchend" : false,
"direction" : "undetermined"
},
touchHandler: function(event) {
var touch;
if (typeof event !== 'undefined'){
@shiawuen
shiawuen / index.html
Created December 29, 2011 15:05
Sample to upload file by chunk
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>test upload by chunk</title>
</head>
<body>
<input type="file" id="f" />
<script src="script.js"></script>
@DerekCaelin
DerekCaelin / gist:fb13d85e4bcd503217cc5793c27dfc08
Last active November 30, 2022 18:13
Google Form to Trello Board via Email
/*
If you want entries on a Google form to auto-create a Trello card,
you can follow the steps below.
There are two ways to connect a Google form to a Trello board. One of them
involves using the Trello API. This version instead works by sending an email to a
Trello board's private email address and then it creates cards based off the content
of the email.
Trello will make a card with a title that matches the "subject" line of the
@JoelLisenby
JoelLisenby / pioneer_vsx-80_telnet_commands.txt
Created July 10, 2017 22:03
Pioneer VSX-80 Telnet Commands
Connect:
telnet 192.168.1.XXX
Volume:
VD = VOLUME DOWN
MZ = MUTE ON/OFF
VU = VOLUME UP
?V = QUERY VOLUME
@benjamincharity
benjamincharity / autonomous.txt
Last active May 17, 2024 22:47
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.
@JoelLisenby
JoelLisenby / optimize.sh
Last active April 5, 2018 16:22
Optimize all jpg and png images in current directory and sub-directories recursively with imagemagick mogrify to google pagespeed spec.
#!/bin/sh
find . -name '*.jpg' -execdir mogrify -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB -format jpg {} \;
find . -name '*.png' -execdir mogrify -strip {} \;
@JoelLisenby
JoelLisenby / gdpr.md
Last active May 4, 2018 21:50
GDPR Summary

General Data Protection Regulation [GDPR] Summary

Must have and store the lawful basis of processing for each contact.

  • Consent (opt-in)
    • Must be told (notified) of what they are opting into.
    • Needs to affirmatively opt-in with an unchecked box. (only opts in for what they were notified they are opting into, not everything you want to send.)
    • Consent must be granular, covering the various ways you use the users data (e.g. email, calls).
    • Must log auditable evidence of what the user consented to: the notice and when they consented.
  • Performance of a contract (customer you need to send bills to)
  • Legitimate interest (customer you want to send products related to what they have)

Hard Reset

  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.
@JoelLisenby
JoelLisenby / new_site.sh
Created January 10, 2019 22:08
Bash script to set up a new project folder for wpengine when using vscode with the sftp extension
#!/bin/bash
echo -e "Domain: \c "
read domain
echo -e "Slug: \c "
read slug
echo -e "Password: \c "
read password
dir="$domain/ftp/public/.vscode"