This file contains 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 | |
# info | |
uname -a | |
# Linux jethub-j100 5.9.16-jethubj100 #trunk.5 SMP PREEMPT Wed Apr 21 13:45:03 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux | |
lsb_release -a | |
#No LSB modules are available. | |
#Distributor ID: Ubuntu | |
#Description: Ubuntu 20.04.2 LTS | |
#Release: 20.04 |
This file contains 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 | |
# China cam/DVR .DAV to .mkv with audio container change | |
# use latest (git) ffmpeg with DHAV support from https://johnvansickle.com/ffmpeg/ | |
# use if normal conversion produces freezed video on start | |
# place actual video format and framereate | |
DAVVIDEO="hevc" | |
DAVFR="12" |
This file contains 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 | |
if [ ! -d "${1}" ]; then | |
# goto no_dir | |
JLinkGDBServer -device Cortex-M3 -if SWD -ir -endian little -speed 3500 & | |
arm-none-eabi-gdb -x gdb_img.jlink | |
killall JLinkGDBServer | |
exit 0 | |
fi |
This file contains 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 | |
echo "===============================" | |
echo "== PI Setup script ==" | |
echo "===============================" | |
echo "" | |
if [ "`id -u`" != "0" ]; then | |
echo "*** ROOT REQUIRED ***" | |
#exit 1 |
This file contains 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 python | |
# | |
# this script will push an OTA update to the ESP | |
# use it like: python espota.py <ESP_IP_address> <ESP_IP_port> <sketch.bin> | |
# updated version with CRC check by Alexander Voronin, av1024@gmail.com | |
# Look at mDNS_SD_OTA sample for information | |
"""Use following (simplified) sample code for reception simulation in OTA handler: | |
This file contains 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
@Override | |
public boolean onGroupClick(ExpandableListView alv, View view, int pos, long id) { | |
if (actionMode == null) return false; | |
int i = alv.getFlatListPosition(ExpandableListView.getPackedPositionForGroup(pos)); | |
alv.setItemChecked(i, !alv.isItemChecked(i)); // Toggle checked state. Modify for exclusive selection | |
try { | |
if (alv.getCheckedItemPosition() != -1) | |
//noinspection ConstantConditions | |
actionMode.getMenu().findItem(R.id.frag_accounts_del).setVisible(true); |
This file contains 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
/** | |
* Mark selected IDs as expanded | |
* @param ids List of ArrayAdapter ID's to be expanded | |
*/ | |
private void setExpandedIds(ArrayList<Long> ids) { | |
if ((ids == null) || (ids.size()==0)) return; | |
YAMKAccountAdapter adp = (YAMKAccountAdapter) lv.getExpandableListAdapter(); | |
if (adp != null) { | |
int sz = adp.getGroupCount(); | |
for (int i=0;i<sz;i++) { |