#!/bin/bash -i | |
#using shebang with -i to enable interactive mode (auto load .bashrc) | |
set -e #stop immediately if any error happens | |
# Install Open SDK | |
apt update | |
apt install openjdk-8-jdk -y | |
update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
java -version |
#include <BLEDevice.h> | |
#include <BLEUtils.h> | |
#include <BLEServer.h> | |
#include "BLE2902.h" | |
#include "BLEHIDDevice.h" | |
#include "HIDTypes.h" | |
#include "HIDKeyboardTypes.h" | |
// See the following for generating UUIDs: | |
// https://www.uuidgenerator.net/ |
PX | REM | TW | |
---|---|---|---|
4 | 0.25 | 1 | |
8 | 0.5 | 2 | |
16 | 1 | 4 | |
32 | 2 | 8 | |
48 | 3 | 12 | |
64 | 4 | 16 | |
80 | 5 | 20 | |
96 | 6 | 24 | |
112 | 7 | 28 |
I owe my very rapid learning journey in the world of ConfigFs to several key sources which aren't necessarily relevant to this result, but I feel deserve a mention anyway.
- This really demystified configfs for me, and stopped me being afraid of it: http://events.linuxfoundation.org/sites/events/files/slides/USB%20Gadget%20Configfs%20API_0.pdf
- I borrowed heavily from this Mindstorms EV3 script: https://github.com/ev3dev/ev3-systemd/blob/ev3dev-jessie/scripts/ev3-usb.sh
- Desperately trawled this thread for answers: https://answers.microsoft.com/en-us/windows/forum/windows_10-networking-winpc/windows-10-vs-remote-ndis-ethernet-usbgadget-not/cb30520a-753c-4219-b908-ad3d45590447?auth=1
- This guide is handy: http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
Well, in hope to get more reliable and modern firmware on my Totolink A850R router from aliexpress.com I decided to upgrade it by TOTOLINK A850R-V1.0.2-20151104.zip from Totolink official site. So, I unpacked downloaded ZIP, started to upgrade the TOTOLINK-A850R-V1.0.2-B20151104.1609.web firmware from web admin panel, where the web form counted from 90 till 1 sec, after that page has been reloaded, I waited few more mins, and ... I figured out that my upgrade failed, with next "achievements":
- I cannot open the web admin panel http://192.168.1.1 from web browser anymore,
- both 5G and 2.4G WiFi do not work anymore, althought LAN/WAN works, i. e. my routed is not completely bricked,
- with using USB-to-RS232 TTL UART PL2303HX Auto Converter adapter I can reach RealTek bootloader console.
So,
/* @offset: should equal top + bottom padding for border-box situations */ | |
/* @line-height: should be unitless */ | |
.multiline-text-overflow-ellipsis(@font-size, @line-height, @max-lines, @max-width, @offset) { | |
display: block; /* Fallback for non-webkit */ | |
display: -webkit-box; | |
max-width: @max-width; | |
height: @font-size*@line-height*@max-lines + @offset; /* Fallback for non-webkit */ | |
font-size: @font-size; | |
line-height: @line-height; | |
-webkit-line-clamp: @max-lines; |
These are my own personal notes on how i setup a Pi Zero W as an access points it is a blatant copy of this: https://gist.github.com/tcg/0c1d32770fcf6a0acf448b7358c5d059 but is just missing a couple of things from: http://imti.co/post/145442415333/raspberry-pi-3-wifi-station-ap and like tcg, this is not intended as a guide but notes as i will invariably have to rebuild this sometime and i have broken biscuits for brains.
this is really just the same info as here https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a
- flash raspbian lite to sd card
- unplug and replug sd card adapter if necessary to see 'boot' drive
- edit
cmdline.txt
add:modules-load=dwc2,g_ether
after the wordrootwait
- edit
config.txt
and adddtoverlay=dwc2
to the end of the file - create a blank file called
ssh
- Download the fastboot ROM suitable for your device from the MIUI site and extract the downloaded archive [edit: MIUI page is dead. Use Xiaomi Firmware Updater]
- Download and extract the Android SDK Platform Tools
- Make sure
adb
andfastboot
(components of platform-tools) are in your
Put this function on the main php file of your dependent plugin and call it with the rigth parameters.
/**
* Verify if a plugin is active, if not deactivate the actual plugin an show an error
* @param [string] $my_plugin_name
* The plugin name trying to activate. The name of this plugin
* Ex: