Note that the following code must be run at every boot for this to work, because of the repeated-start requirement:
sudo su -c 'echo "Y" > /sys/module/i2c_bcm2708/parameters/combined'
| #!/usr/bin/env python3 | |
| # Free Open Source Software released under GPLv2 | |
| # see http://www.gnu.org/licenses/gpl-2.0 | |
| # Author: Florian Knodt <[email protected]> | |
| # Original Author: Tilman Schmidt <[email protected]> | |
| # Contributor: Peter Pawn @ IP Phone Forum | |
| # inspired by http://www.administrator.de/contentid/214598 | |
| # Requirements (for example via pip): graypy, requests |
| from re import A | |
| from PIL import Image, ImageDraw | |
| width = 180 | |
| height = 240 | |
| diff_start=0x80 | |
| first_array_start = diff_start | |
| first_array_end = diff_start + width * height - 1 | |
| second_array_start = diff_start + width * height |
| get_latest_release() { | |
| curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
| grep '"tag_name":' | # Get tag line | |
| sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
| } | |
| # Usage | |
| # $ get_latest_release "creationix/nvm" | |
| # v0.31.4 |
Note that the following code must be run at every boot for this to work, because of the repeated-start requirement:
sudo su -c 'echo "Y" > /sys/module/i2c_bcm2708/parameters/combined'
We will explain how to configure a cubieboard running debian as a reverese proxy.
The modules that will be used are wvdial and autossh
Credits goes to:
1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
You can use this class to realize a simple sectioned grid RecyclerView.Adapter without changing your code.
The RecyclerView has to use a GridLayoutManager.
This is a porting of the class SimpleSectionedListAdapter provided by Google
If you are looking for a sectioned list RecyclerView.Adapter you can take a look here
| import re | |
| history_snippet = '''Start-Date: 2014-08-25 12:52:37 | |
| Commandline: apt-get install -y openjdk-6-jdk openjdk-7-jdk icedtea-7-plugin | |
| Install: openjdk-6-jre-lib:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), icedtea-netx-common:amd64 (1.5-1ubuntu1, automatic), openjdk-6-jdk:amd64 (6b32-1.13.4-4ubuntu0.14.04.1), libxcb1-dev:amd64 (1.10-2ubuntu1, automatic), ttf-dejavu-extra:amd64 (2.34-1ubuntu1, automatic), icedtea-6-jre-cacao:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), icedtea-7-plugin:amd64 (1.5-1ubuntu1), libxau-dev:amd64 (1.0.8-1, automatic), openjdk-6-jre-headless:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), x11proto-core-dev:amd64 (7.0.24-1, automatic), libxt-dev:amd64 (1.1.4-1, automatic), openjdk-7-jdk:amd64 (7u65-2.5.1-4ubuntu1~0.14.04.1), libx11-dev:amd64 (1.6.2-1ubuntu2, automatic), x11proto-kb-dev:amd64 (1.0.6-2, automatic), openjdk-6-jre:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), xtrans-dev:amd64 (1.3.2-1, automatic), libxdmcp-dev:amd64 (1.1.1-1, automatic), icedtea-netx:a |
| #/bin/bash | |
| #-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
| REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
| if [ -z "$REPO_URL" ]; then | |
| echo "-- ERROR: Could not identify Repo url." | |
| echo " It is possible this repo is already using SSH instead of HTTPS." | |
| exit | |
| fi |