This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
DualSense (DS5) USB HID Report Descriptor | |
Documentation WIP | |
TODO: Extract info from hid-playstation and cross-verify with us. | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" == "" ]; then | |
echo "Error: database required: use create-database <db_name> <username> <password>" | |
exit 1 | |
fi | |
if [ "$2" == "" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# configure script parameters here | |
USERNAME=username # username for ssh/scp connection | |
SERVER=123.123.123.123 # server ip for ssh/scp connection | |
PORT=22 # ssh port | |
ADDITIONAL_SSH_PARAMS="-i mykeys.pem" # additional ssh parameters to append to ssh and scp commands | |
REMOTE_DATABASE_NAME=exampledb # name of the database on the remote server (used with dump script and as sql remote filename) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_dow="$(date +'%A'|cut -c 1-3)" | |
# dumps the database with day of the week appended | |
mysqldump mydb -u db-user -p'password' > "/home/ubuntu/databases/database-demo-${_dow,,}.sql" | |
# copies last db dumped | |
cp "/home/ubuntu/databases/database-demo-${_dow,,}.sql" /home/ubuntu/database-demo.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TADA, it’s `hexdump -v -e '64/1 "%02x" "\n"' < /dev/hidraw3` | |
No idea what the first byte is… but I’m going to assume its for device ID for the many users that are connected, but it probably has to be set by the connected machine? | |
01ff777f7f0800aa0000435dfdf1ff14000200c5ff0721150300000000001b000001fc9133a32990880428008000000080000000008000000080000000008000 | |
↑↑↑↑ | |
left stick, value, first field is horz (00 left), second field is vertical (00 top) | |
017f80ff61080064000059f2fdfffffbff0e00d107081e9bf600000000001b0000018e94b1b00690880428008000000080000000008000000080000000008000 | |
↑↑↑↑ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# include config | |
# config example below: | |
# | |
# | |
# Example deploy_config.sh | |
# | |
# dev_env() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html | |
MyEntity: | |
type: entity | |
repositoryClass: MyRepositoryClass | |
table: my_entity | |
namedQueries: | |
all: "SELECT u FROM __CLASS__ u" | |
# Class-Table-Inheritance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import SimpleCV | |
import time | |
import simplejson as json | |
import sys | |
if __name__ == "__main__": | |
captureDir = '/opt/display/applications/tldisplayclient/static' | |
ofilename = '%s/webcam-original.png' % captureDir | |
dfilename = '%s/webcam-detected.png' % captureDir |