-
Delete/Remove Software/Package, Link
- Search in list of packages with
dpkg --list
- Find name of package and delete
sudo apt-get --purge remove shiny-server
--purge
removes config files, too--autoremove
: delete unused packages- in combination
sudo apt-get --purge --autoremove remove shiny-server
- maybe also look for all files with the package name and delete them:
find -name shiny-server
- Search in list of packages with
-
Find all files with string in name:
find -name string
-
Find all files with string and delete them: ``find . -name "FILE-TO-FIND" -exec rm -rf {} ;` (folder, too), link
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
function strytllr_redirect_from_story_to_first_slide(){ | |
global $wp_query; | |
if( is_archive() && $wp_query->query('showposts=1&order=ASC') ){ | |
the_post(); | |
// Get permalink | |
$post_url = get_permalink(); | |
// Redirect to post page | |
wp_redirect( $post_url ); | |
} | |
} |
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
library(httr) | |
# webdav target and login | |
dav <- "https://your-nextcloud.com/remote.php/webdav" | |
username <- "<username>" | |
password <- "<password>" | |
# the file to upload | |
img <- "image.png" |
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
### Measure Temperature and Humidity very 30 secs and save it csv file | |
# code https://pimylifeup.com/raspberry-pi-humidity-sensor-dht22/ | |
### Create a Telegram Bot | |
# - create a bot by texting to BotFather `/newbot` and receive a token | |
# - go to `https://api.telegram.org/botYOUR_TOKEN/getUpdates` | |
# - send a text to your bot | |
# - the JSON on `https://api.telegram.org/botYOUR_TOKEN/getUpdates` will update and you get the `chat_id` | |
# send a message to chat: `https://api.telegram.org/botYOUR_TOKEN/sendMessage?chat_id=CHAT_ID&text=I+can+talk+to+you` | |
# link: [Creating a Telegram bot for personal notifications](https://www.forsomedefinition.com/automation/creating-telegram-bot-notifications/) |
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
# get column stored as variable | |
# alternative to eval() | |
column <- "name" | |
df %>% filter(get(column)==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
# Save a dataframe als xlsx with each group a separate sheet | |
# plus formatting and highlighting | |
library(dplyr) | |
library(purrr) | |
library(openxlsx) | |
# some configs | |
filename <- "test.xlsx" |
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
# Goal: Fetch German street addresses | |
# Works on: | |
# Müllerstr. 26 | |
# Müllerstr 26 | |
# Müllerstraße | |
# Müllerstraße 26 | |
# Müllerplatz | |
# Müllerstraße 26a | |
# Müller Straße 26 |
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
date_marker_start = "[Aa]b$|[Zw]ischen$|[Bb]is$|[Ss]eit$|[Vv]on$" | |
date_marker_between = "\\-|und|bis" | |
date_marker_decade = "er|er Jahre" | |
day = "0?[1-9]|[12]\d|3[01]" | |
month = "Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember|0?1\.|0?2\.|0?3\.|0?4\.|0?5\.|0?6\.|0?7\.|0?8\.|0?9\.|10\.|11\.|12\." | |
year = "[12][0-9]{3}" # years from 1000 to 2999 | |
decade_years = "[12][0-9]{2}0ern?" # 1970er, 1990er | |
daymonthyear = "^(((0?[1-9]|[12]\d|3[01])\.(0[13578]|[13578]|1[02])\.((1[6-9]|[2-9]\d)\d{2}))|((0?[1-9]|[12]\d|30)\.(0[13456789]|[13456789]|1[012])\.((1[6-9]|[2-9]\d)\d{2}))|((0?[1-9]|1\d|2[0-8])\.0?2\.((1[6-9]|[2-9]\d)\d{2}))|(29\.0?2\.((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$" # all combinations of German compact dates | |
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
{% if is_new_article %} | |
# {{title}} - hypothes.is | |
## Metadata | |
{% if author %}{{author}}{% endif %}, {{title}}, {% if url %}{{url}}{% endif %} | |
{% endif %} | |
{%- if is_new_article %} | |
{% if page_notes|length %} | |
## Page Notes |
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
library(DBI) | |
library(tidyverse) | |
# Import SPSS ------------------------------------------------------------- | |
cleaned_dataframe_with_spss_data <- .... | |
# Write to DB ------------------------------------------------------------- |