Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
CONFIG_FILE=$(echo /etc/X11/xorg.conf.d/??-touchpad-cmt.conf)
test -f $CONFIG_FILE || CONFIG_FILE="/etc/X11/xorg.conf.d/40-touchpad-cmt.conf"
# Check which type of touchpad is present.
if grep -qi synaptics /proc/bus/input/devices; then
echo "Synaptics touchpad detected."
TOUCHPAD="synaptics"
elif grep -qi alps /proc/bus/input/devices; then
@zerocity
zerocity / app.js
Created May 1, 2014 10:33
ui-router // scope problem
...
.state('app',{
url: '/',
controller: 'MainCtrl as main',
views:{
'header':{
controller: 'MainCtrl as main',
templateUrl:'views/header.html'
},
@zerocity
zerocity / template
Last active August 29, 2015 13:59
Neurocid json template
{
"BattleFieldLayout": {
"width": 300000,
"height": 300000,
"iterations": 1500
},
"PhysicsLayout": {
"gravity": [
0,
0
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@zerocity
zerocity / gist:4082088
Created November 15, 2012 22:53
update nested entries
{
name:"some name",
dob:"april 4, 1985",
content:
0:{children:
0:{
'title':'some text',
1:{etc ..}
}
1:{children: