If that does not work ...
https://superuser.com/questions/1018877/ubuntu-mount-image-file-with-r-w-permission
sudo fdisk -l raspberry_pi.img
Multiply sector size in bytes (e.g. 512) with sector start of partition you want to mount
#!/bin/bash | |
# Add CRAN Repository for an up-to-date R-Version | |
# https://cran.r-project.org/bin/linux/ubuntu/README.html | |
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' | |
# Follow instructions to add key | |
# Install R | |
sudo apt update | |
sudo apt install libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev |
no_zero <- function(x, integer_zero = TRUE, digits = 2) { | |
x <- round(x, digits = digits) | |
y <- sprintf(paste0('%.', digits,'f'),x) | |
y[x > 0 & x < 1] <- sprintf('.%s',x[x > 0 & x < 1]*(10**digits)) | |
y[x > -1 & x < 0] <- sprintf('-.%s',x[x > -1 & x < 0]*(-10**digits)) | |
y <- gsub(pattern = "0", replacement = "", x = y) | |
if(integer_zero){ | |
y[(x%%1) == 0] <- sprintf("%s", x[(x%%1) == 0]) | |
} else { | |
y[x == 0] <- '0' |
#!/bin/bash | |
# Install common packages; the tidyverse commes with a LOT of dependencies | |
R --vanilla << EOF | |
install.packages(c("tidyverse", "data.table", "devtools"), repos = "https://cran.rstudio.com/") | |
q() | |
# Install common packages for spatial operations | |
sudo apt install libgdal-dev gdal-bin libproj-dev libudunits2-dev | |
R --vanilla << EOF | |
install.packages(c("rgdal", "rgeos", "sp", "sf", "raster"), repos = "https://cran.rstudio.com/") |
### INSTALL ALL LIBRARIES AND DEPENDENCIES ##### | |
# this will only install the packages that are not already installed on your computer i.e. packages won't get updated | |
libs <- c( | |
) | |
## which packages are not yet installed? | |
libsInstalled <- installed.packages()[,1] |
#!/bin/bash | |
find /mnt/ncp-backup/backup-current/OekoFor -type f -printf "%T+\t%p\n" | sort | tail -10 |
If that does not work ...
https://superuser.com/questions/1018877/ubuntu-mount-image-file-with-r-w-permission
sudo fdisk -l raspberry_pi.img
Multiply sector size in bytes (e.g. 512) with sector start of partition you want to mount
import io | |
import selectors | |
import subprocess | |
import sys | |
def capture_subprocess_output(subprocess_args): | |
# Start subprocess | |
# bufsize = 1 means output is line buffered | |
# universal_newlines = True is required for line buffering | |
process = subprocess.Popen(subprocess_args, |
#!/bin/sh | |
if test $# -eq 0 | |
then | |
echo "No name on command line." | |
exit 1 | |
fi | |
echo $1 | |
NAME=$1 |
If you're like me you have a dir like ~/Workspace/Github
where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.
Usage:
git-status [directory]
This will run git status
on each repo under the directory specified. If called with no directory provided it will default to the current directory.
#!/bin/sh | |
setxkbmap -device `xinput list | grep "Virtual core XTEST keyboard" | sed -e 's/.\+=\([0-9]\+\).\+/\1/'` -layout "de" -variant "nodeadkeys" |