Skip to content

Instantly share code, notes, and snippets.

View jeremychone's full-sized avatar

Jeremy Chone jeremychone

View GitHub Profile
@jeremychone
jeremychone / dualshock4-nodejs-experiement.js
Created December 12, 2013 21:06
Just a little experiment reading dualshock4 bluetooth inputs with node.js. Uses node-hid.
/**
* Just for fun, hacking Dualshock4 with node.js
* Most of the code comes from https://npmjs.org/package/dualshock-controller
* Just wanted to play with the low level hid protocol.
* Next step: EV3 Control via Bluetooth with Dualshock4 (PC still required).
* Future step: EV3 node.js onboarding with Dualshock4 remote control (Autonomous).
*/
var HID = require('node-hid');
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>APP_BASE_PACKAGE</groupId>
<artifactId>APP_NAME</artifactId>
<packaging>war</packaging>
<version>0.1</version>
<name>APP_NAME</name>
<url>http://maven.apache.org</url>
@Singleton
public class AppAuthRequest implements AuthRequest<User>{
@Inject
private UserDao userDao;
@Override
public AuthToken<User> authRequest(RequestContext rc) {
AuthToken<User> authToken = null;
@jeremychone
jeremychone / Sample.html
Last active December 16, 2015 16:09
brite.js with require
<html>
<body>first test</body>
</html>
@jeremychone
jeremychone / init.d-openresty.sh
Created April 6, 2013 04:00
The init.d/openresty file for Amazon Linux (and probably redhat linux families). Just based on the default init.d/nginx (that comes from a standard "yum install nginx"
#!/bin/sh
#
# openresty adapted script to start and stop the openresty compiled
# nginx daemon
# --- original nginx comment ---
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \