Skip to content

Instantly share code, notes, and snippets.

View Noah-Huppert's full-sized avatar
🐢

Noah Huppert Noah-Huppert

🐢
View GitHub Profile
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<div class="clickOBJ">
OBJ 1
</div>
<div class="clickOBJ">
@Noah-Huppert
Noah-Huppert / gist:7274702
Last active December 27, 2015 05:29
Javascript custom sorting problem
//JS Code:
var dates = new Array(//Note if there is a problem with the array definition it would not matter b/c the array gets
//created dynamically in a different order.
"2013-1-1"
"2013-10-10",
"2013-10-15",
"2013-10-22",
"2013-10-22",
"2013-10-28",
"2013-12-17",
var sortedDates = dates.slice(0).sort(function(a,b){
return (new Date(b))-(new Date(a))
});
@Noah-Huppert
Noah-Huppert / gist:7681582
Created November 27, 2013 19:23
JS mouse data collections
x = event.x;
y = event.y;
x -= canvas.offsetLeft;
y -= canvas.offsetTop;
@Noah-Huppert
Noah-Huppert / gist:7681588
Created November 27, 2013 19:23
JS make line
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(prevX, prevY);
ctx.lineTo(x, y);
ctx.stroke();
prevX = x;
prevY = y;
@Noah-Huppert
Noah-Huppert / gist:7742489
Created December 1, 2013 23:53
The optimal CNC.js export file
"scale" : {
"id" : "0",
"point0X" : "633",
"point0Y" : "95",
"point1X" : "393",
"point1Y" : "95",
"scale" : "240",
"scaleSet" : "true"
}
"origin" : {
@Noah-Huppert
Noah-Huppert / gist:7995102
Created December 16, 2013 21:55
Moto Support
George: Hi, my name is George. How may I help you?
Noah: I purched a pair of Sol JAX earbuds and they have a problem where if you rotate the jack to a certain position they stop working on all devices.
George: We apologize for any inconvenience. Please know that we will do our best to assist you on this.
Noah: Can I have a replacement pair.
George: When did you experience such issue and what type of troubleshooting steps have you tried in your end so far?
Noah: I have checked the connection for each portion of the jack with a multimeter and there are no dead spots. Another common problem I saw with this is pair of headphones is a puece of plastic on the jack to I checked for that and there was none. I also checked this problem with 5 other devices(Apple, android, windows, and mac) and the problem still occurs.
George: I see.
George: May I know when did you purchase the headset and do you still have the proof of purchase such as receipt?
Noah: I purchased them about a week ago and I have a email co
echo Client::curl("GET", Array("function" => "deleteTableItem", "tableName" => $tableName, "tableItemName" => $tableItemName, "tableItemColID" => $tableItemColID));
@Noah-Huppert
Noah-Huppert / gist:9315228
Created March 2, 2014 22:57
Temp Install for PA In-Game-Browser
/* CHANGES MADE BY SOMEONEWHOISNOBODY */
loadScript("coui://ui/alpha/shared/js/inGameBrowser.js");
loadCSS("coui://ui/alpha/shared/css/inGameBrowser.css");
@Noah-Huppert
Noah-Huppert / JS Async setInterval
Created May 25, 2014 01:58
JS Async setInterval
function asyncInterval(){
var self = this;
self.interation = {};
self.interationNumber = 0;
self.asyncCompleteFlag = false;
self.checkInterval = undefined;
self.start = function(toRun, speed){//toRun must be passed asyncInterval, so it can set asyncCompleteFlag