Add BOM to CSV files (to open UTF-8 CSVs correctly in Excel):
sed -i '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' *.csv
To check if a file contains UTF-8 BOM at header:
# hexdump -n 3 -C 2.txt
00000000 ef bb bf
#!/bin/bash | |
set -e | |
# Ensure we have at least two arguments: the script file and at least one host | |
if [ "$#" -lt 2 ]; then | |
echo "Usage: $0 <script_file> <host1> <host2> ... <hostN>" | |
exit 1 | |
fi | |
# Get script file and hosts from arguments |
#!/bin/bash | |
# Read the input from the curl command | |
input=$(cat -) | |
# Extract the running_time_in_nanos field from the input | |
running_time_in_nanos=$(echo $input | jq '.task.running_time_in_nanos') | |
# Extract the values of "total" and the sum of "updated", "created", "deleted", and "noops" from the input | |
total=$(echo $input | jq '.task.status.total') |
#!/bin/bash | |
set -e | |
# colors | |
RED="\e[31m" | |
GREEN="\e[32m" | |
YELLOW="\e[33m" | |
ENDCOLOR="\e[0m" |
echo -e "\n\nDownloading custom ProtonVPN scripts...\n\n" | |
curl -s -o ~/protonvpn.sh "https://gist.githubusercontent.com/jonasjancarik/d5b73a1c1274defd290304db1cb0dfaf/raw/protonvpn.sh?$RANDOM" | |
chmod +x ~/protonvpn.sh | |
curl -s -o ~/Desktop/protonvpn_script.desktop "https://gist.githubusercontent.com/jonasjancarik/d5b73a1c1274defd290304db1cb0dfaf/raw/protonvpn_script.desktop?$RANDOM" | |
chmod 755 ~/Desktop/protonvpn_script.desktop | |
gio set ~/Desktop/protonvpn_script.desktop metadata::trusted true | |
curl -s -o ~/Desktop/protonvpn_disconnect.desktop "https://gist.githubusercontent.com/jonasjancarik/d5b73a1c1274defd290304db1cb0dfaf/raw/protonvpn_disconnect.desktop?$RANDOM" | |
chmod 755 ~/Desktop/protonvpn_disconnect.desktop | |
gio set ~/Desktop/protonvpn_disconnect.desktop metadata::trusted true | |
echo -e "\n\n\e[32m$(tput bold)The script is now installed.$(tput sgr0)\e[0m \nUse the \"ProtonVPN (Free)\" shortcut on the desktop to launch it.\n\n" |
[Desktop Entry] | |
Type=Application | |
Name=Change Tor Country | |
Exec=sh -c "~/Desktop/Browser/change_tor_country.sh" | |
Icon=gnome-globe-net | |
Terminal=true |
echo "Writing a script to toggle the settings (~/toggle_dns.sh)..." | |
if echo "#!/bin/bash | |
if grep -Fxq \"dns=none\" /etc/NetworkManager/NetworkManager.conf | |
then | |
echo \"[main] | |
plugins=ifupdown,keyfile | |
[ifupdown] | |
managed=false\" > /etc/NetworkManager/NetworkManager.conf |
import tweepy | |
from dotenv import load_dotenv | |
import os | |
load_dotenv() | |
class Listener(tweepy.Stream): | |
def __init__(self, *args, **kwargs): | |
super(Listener, self).__init__(*args) |
(koronavirus OR koronaviru OR koronavirusu OR koronavire OR koronaviruse OR koronavirem OR koronavirusem OR covid OR covidu OR covide OR covidem OR covid-19 OR covidový OR covidového OR covidovému OR covidovém OR covidovým OR covidová OR covidové OR covidovou OR covidoví OR covidových OR covidovými OR koronavirový OR koronavirového OR koronavirovému OR koronavirovém OR koronavirovým OR koronavirová OR koronavirové OR koronavirovou OR koronaviroví OR koronavirových OR koronavirovými) | |
AND | |
(vakcína OR vakcíny OR vakcíně OR vakcínu OR vakcíno OR vakcínou OR vakcín OR vakcínám OR vakcínách OR vakcínami OR očkování OR očkováním OR očkováních OR očkováními OR očkovací) |
// ==UserScript== | |
// @name DVTV Playback Speed Controls | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Adds playback speed controls to the DVTV video player | |
// @author You | |
// @match https://video.aktualne.cz/dvtv/* | |
// @grant none | |
// ==/UserScript== |
Add BOM to CSV files (to open UTF-8 CSVs correctly in Excel):
sed -i '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' *.csv
To check if a file contains UTF-8 BOM at header:
# hexdump -n 3 -C 2.txt
00000000 ef bb bf