$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ AlpsPS/2 ALPS DualPoint TouchPad id=11 [slave pointer (2)]
⎜ ↳ AlpsPS/2 ALPS DualPoint Stick id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
This file contains hidden or 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/env escript | |
% This script can be run from any directory with write permission. | |
% You need to set the ERL_LIBS environment variable to the location of the | |
% installed erlang apps. For example: | |
% ERL_LIBS=/opt/couchbase/lib/couchdb/erlang/lib PATH=$PATH:/opt/couchbase/bin escript initial_index.escript | |
-define(UPR_PORT, "11209"). | |
%-define(UPR_PORT, "12000"). |
This file contains hidden or 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/env python3 | |
from collections import OrderedDict | |
import csv | |
import json | |
import re | |
import sys | |
import unicodedata | |
This file contains hidden or 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/sh | |
scanimage --resolution 300 --mode Gray --format=tiff --custom-gamma=yes --custom-gamma=yes --gamma-table [0]0-[165]65535,[165]65535-[255]65535 --buffer-size=128 > output.tiff |
This file contains hidden or 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
#include <sys/time.h> | |
#include <fstream> | |
#include <vector> | |
#include "fbson/FbsonJsonParser.h" | |
// From http://stackoverflow.com/a/1861493/935109 | |
typedef unsigned long long timestamp_t; | |
static timestamp_t get_timestamp () |
This file contains hidden or 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
% Traversing view btrees | |
% Compile with: | |
% | |
% ERL_LIBS=<path-to-your-couchbase-source>/install/lib/couchdb/erlang/lib erlc | |
% | |
% Run with: | |
% | |
% ERL_LIBS=<path-to-your-couchbase-source>/install/lib/couchdb/erlang/lib erl -s traverseviews -noshell -s init stop | |
% | |
-module(traverseviews). |
This file contains hidden or 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
-behaviour(gen_server). | |
-export([start/0, msg/1, msg_recv/1]). | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). | |
start() -> | |
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []). | |
msg(Msg) -> |
This file contains hidden or 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/env python2 | |
# Dump the contents of a vbucket file into a directory of the same name. The | |
# keys are the filenames, the value the file contents | |
import os | |
import sys | |
import couchstore |
This file contains hidden or 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 | |
# Works for me on Android 7.0 (Nougat) | |
# You might need to edit `frameworks/base/packages/SystemUI/Android.mk` and add | |
# `LOCAL_JACK_FLAGS := --multi-dex native` to the `SYSTEM_UI_INCREMENTAL_BUILDS` | |
# case | |
. build/envsetup.sh | |
SYSTEM_UI_INCREMENTAL_BUILDS=true make -j 4 | |
adb start-server | |
adb shell pkill -TERM -f com.android.systemui | |
adb remount |