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
// Gephi SVG visualisation interactivity | |
$('.viz-view svg').click(function (event) { | |
// check if the click was on one of the SVG child elements | |
if (event.target !== this) { | |
// set the clicked element as the target (because 'this' is the parent SVG element) | |
var target = $(event.target); | |
// if the click is on an edge path |
// ==UserScript== | |
// @name Medium - Hide Featured | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description try to take over the world! | |
// @author You | |
// @match https://medium.com/* | |
// @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
// ==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== |
(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í) |
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) |
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 |
[Desktop Entry] | |
Type=Application | |
Name=Change Tor Country | |
Exec=sh -c "~/Desktop/Browser/change_tor_country.sh" | |
Icon=gnome-globe-net | |
Terminal=true |
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" |
#!/bin/bash | |
set -e | |
# colors | |
RED="\e[31m" | |
GREEN="\e[32m" | |
YELLOW="\e[33m" | |
ENDCOLOR="\e[0m" |