I purchased a Surface Pro tablet to be able to use it as a portable Cintiq tablet. I own a Cintiq 21ux and use it with Ubuntu.
I was kinda disappointed after installing Ubuntu since pen pressure sensitivity did not work.
I poked around and realized that Microsoft shipped a wacom driver compatible device but changed the vendor and device id.
I wrote a script to use the wacom drivers and calibrate the stylus and eraser:
fix-surface-pro-pen.sh
I'll try to add my changes to the wacom drivers to avoid having to do this hack if I get some time.
nonameentername
Thursday, April 16, 2015
Saturday, March 16, 2013
Debug android NDK
I have been trying to debug my android application for a few weeks now, and was unable to set breakpoints.
I finally figured out that there is a bug in the NDK, following the steps in this article link
To be able to set breakpoints I had to only build only one version of the shared libraries to avoid the linker from choosing the wrong shared library. Basically I had to change the file Application.mk with the following:
I finally figured out that there is a bug in the NDK, following the steps in this article link
To be able to set breakpoints I had to only build only one version of the shared libraries to avoid the linker from choosing the wrong shared library. Basically I had to change the file Application.mk with the following:
APP_ABI := armeabi armeabi-v7a APP_ABI := armeabi #armeabi-v7aNow I can continue using breakpoints within the android NDK.
Sunday, February 3, 2013
Ubuntu disable ctrl-p
Some laptops use ctrl-p to switch display. Ubuntu added support for this and broke my shortcut configuration.
To disable ctrl-p switching displays type the following on a terminal:
dconf write /org/gnome/settings-daemon/plugins/media-keys/active falsereference
Monday, July 2, 2012
Disable super key gnome shell 3.4 (gnome3)
I don't like how gnome-shell uses the super key for the overlay shortcut. This can be disabled by typing the following command in a terminal.
gsettings set org.gnome.mutter overlay-key ''When changing workspaces only the primary monitor changes. To allow all monitors to change use the following.
gsettings set org.gnome.shell.overrides workspaces-only-on-primary false
Thursday, June 7, 2012
Generate XmlRootElement for jaxb objects
I recently had to add XmlRootElement to a class. After using google for a while, I finally figured out a way to do it. I Updated the pom jaxb plugin to include the annotate plugin and created a mappings file that customizes the jaxb object.
pom.xml:
<plugin>
<groupid>org.jvnet.jaxb2.maven2</groupid>
<artifactid>maven-jaxb2-plugin</artifactid>
<configuration>
<extension>true</extension>
<strict>false</strict>
<plugins>
<plugin>
<groupid>org/jvnet/jaxb2_commons</groupid>
<artifactid>annotate</artifactid>
<version>0.4.1.5</version>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<bindingincludes>
<include>*.xjb</include>
</bindingincludes>
<args>
<arg>-Xannotate</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
file.xjb:
<!--?xml version="1.0" encoding="UTF-8" standalone="yes"?-->
<jaxb:bindings version="2.1"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:annox="http://annox.dev.java.net"
jaxb:extensionbindingprefixes="annox">
<jaxb:bindings schemalocation="filename.xsd" node="/xs:schema">
<jaxb:bindings node="xs:complexType[@name='ObjectType']">
<annox:annotate>
<annox:annotate
annox:class="javax.xml.bind.annotation.XmlRootElement"
name="access">
</annox:annotate>
</annox:annotate></jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
Wednesday, May 30, 2012
inotifywait - run scripts on file changes
When working on a project in Java, I often need to stop/start maven whenever I make changes to the source code. I wanted to have maven restart automatically whenever I changed the source code. I ended up using some bash scripts to get the job done.
inotifywait will run the script restart.sh whenever a file inside src is saved. This could also be done to automatically run test when source code changes.
watch.sh:
#!/bin/bash while inotifywait -re close_write src; do ./restart.sh; donerestart.sh:
#!/bin/bash ./kill_tomcat.sh sleep 1 mvn tomcat:run -o &kill_tomcat.sh:
#!/bin/bash pkill -kill -f tomcat:run
Tuesday, February 28, 2012
python rfoo rconsole
I ran accross this today. rfoo allows connecting to a remote running session of python and inspect the session's values, modify the data, etc.
You can read more about it here
Install in ubuntu:
sudo apt-get install python-dev pip install cython pip install rfoorconsole is a remote Python console with auto completion, which can be used to inspect and modify the namespace of a running script. To invoke in a script do:
from rfoo.utils import rconsole rconsole.spawn_server()To attach from a shell do:
rconsole
Subscribe to:
Comments (Atom)