Skip to content

Instantly share code, notes, and snippets.

View maxchehab's full-sized avatar
🐝
explaining think to sand

Max Chehab maxchehab

🐝
explaining think to sand
View GitHub Profile
<!-- save as index.html -->
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
</head>
<body>
<script>
var socket = io.connect('http://localhost');
package org.usfirst.frc.team8080.robot;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
package org.usfirst.frc.team8080.robot;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.imgproc.Imgproc;
import edu.wpi.cscore.CvSink;
import edu.wpi.cscore.CvSource;
package org.usfirst.frc.team8080.robot;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.imgproc.Imgproc;
import edu.wpi.cscore.CvSink;
import edu.wpi.cscore.CvSource;
package org.usfirst.frc.team8080.robot;
import java.util.ArrayList;
import java.util.List;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.imgproc.Imgproc;
package org.usfirst.frc.team8080.robot;
import java.util.ArrayList;
import java.util.List;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.imgproc.Imgproc;
var parent = document.getElementById("you-element-id")[0];
//used this tool to escape the svg code
var svg = "<svg xmlns:dc=\"http:\/\/purl.org\/dc\/elements\/1.1\/\" xmlns:cc=\"http:\/\/creativecommons.org\/ns#\" xmlns:rdf=\"http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#\" xmlns:svg=\"http:\/\/www.w3.org\/2000\/svg\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" id=\"svg2\" viewBox=\"0 0 295.45172 200.65731\" height=\"56.629951mm\" width=\"83.383041mm\">\r\n <defs id=\"defs4\"><\/defs>\r\n <metadata id=\"metadata7\">\r\n <rdf:rdf>\r\n <cc:work rdf:about=\"\">\r\n <dc:format>image\/svg+xml<\/dc:format>\r\n <dc:type rdf:resource=\"http:\/\/purl.org\/dc\/dcmitype\/StillImage\"><\/dc:type>\r\n <dc:title><\/dc:title>\r\n <\/cc:work>\r\n <\/rdf:rdf>\r\n <\/metadata>\r\n <g transform=\"translate(-7.6481925,-799.25523)\" id=\"layer1\">\r\n <g transform=\"matrix(0.53816341,0,0,0.52254509,-94.592485,485.33091)\" id=\"g4147\">\r\n <path id=\"path4153\" d=\"
@maxchehab
maxchehab / gpio.sh
Created June 20, 2017 07:55
Bash script to read and write RaspberryPi gpio pins
# usage:
# >sudo sh gpio.sh <action> <pin> <value>
# reading example:
# >sudo sh gpio.sh read 1
# >0
# writing example:
# >sudo sh gpio.sh write 3 1
#!/bin/bash
Checking CELERY_QUEUES matches Procfile
Running flake8
Running isort
ERROR: /home/vagrant/treeherder/treeherder/webapp/api/urls.py Imports are incorrectly sorted.
--- /home/vagrant/treeherder/treeherder/webapp/api/urls.py:before 2017-07-19 03:02:04.992355
+++ /home/vagrant/treeherder/treeherder/webapp/api/urls.py:after 2017-07-19 20:21:16.747773
@@ -13,8 +13,8 @@
jobs,
note,
performance_data,
failure_classifications = None
push_with_three_jobs = <Push: test_treeherder_jobs 45f8637cb9f78f19cb8463ff174e81756805d8cf>
pulse_action_consumer = <kombu.simple.SimpleQueue object at 0x7fbf37a5b610>
test_repository = <Repository: test_treeherder_jobs development>
test_user = <User: testuser1>
def test_resultset_cancel_all(failure_classifications,
push_with_three_jobs, pulse_action_consumer,
test_repository, test_user):
"""