Skip to content

Instantly share code, notes, and snippets.

View smowtion's full-sized avatar

Smowtion smowtion

View GitHub Profile
@smowtion
smowtion / chromedriver.sh
Created January 9, 2022 14:06 — forked from mikesmullin/chromedriver.sh
easily install chromedriver on linux/osx
sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
@smowtion
smowtion / tunnelbroker-net.linux.etc-network-interfaces.sh
Last active September 8, 2021 10:11 — forked from pklaus/tunnelbroker-net.linux.etc-network-interfaces.sh
tunnelbroker.net : tunnel setup on Linux using "ip" from the iproute suite (iproute2)
#!/bin/bash
# IPv6 Tunnel setup of an tunnelbroker.net tunnel on Linux using the configuration file `/etc/network/interfaces`
# (needs the `ip` tool from the iproute suite, Ubuntu package: <http://packages.ubuntu.com/iproute>)
#
# Run like this:
# ./tunnelbroker-net.linux.etc-network-interfaces.sh
#
# 2011 by Philipp Klaus
# Published on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-tunnel-setup-on-ubuntu-11-04/>
@smowtion
smowtion / disable_gpu.py
Created August 21, 2021 04:06 — forked from AIAnytime/disable_gpu.py
How to disable GPU with TensorFlow?
try:
# Disable all GPUS
tf.config.set_visible_devices([], 'GPU')
visible_devices = tf.config.get_visible_devices()
for device in visible_devices:
assert device.device_type != 'GPU'
except:
# Invalid device or cannot modify virtual devices once initialized.
pass
@smowtion
smowtion / remove_tuxera.sh
Created August 10, 2021 04:22 — forked from miguelmota/remove_tuxera.sh
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
sudo rm -rf /Applications/Tuxera\ Disk\ Manager.app
sudo rm -rf /Library/Application\ Support/Tuxera\ NTFS
sudo rm -rf /Library/Filesystems/fusefs_txantfs.fs
@smowtion
smowtion / script.php
Created March 24, 2021 14:26 — forked from barreeeiroo/script.php
PHP Script to integrate UpTimeRobot with Cachet
<?php
ini_set('error_reporting', true);
error_reporting(E_ALL);
$CACHET_URL = "";
$CACHET_KEY = "";
$METRIC_ID = "";
$UPTIMEROBOT_KEY = "";
nserver 208.67.222.222
nserver 208.67.220.220
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
daemon
# http(s)
#auth none
auth strong
190.2.140.41:37075
190.2.140.41:37076
190.2.140.41:37077
190.2.140.41:37078
190.2.140.41:37079
190.2.140.41:37080
190.2.140.41:37081
190.2.140.41:37082
190.2.140.41:37083
190.2.140.41:37084
190.2.140.41:37075
190.2.140.41:37076
190.2.140.41:37077
190.2.140.41:37078
190.2.140.41:37079
190.2.140.41:37080
190.2.140.41:37081
190.2.140.41:37082
190.2.140.41:37083
190.2.140.41:37084
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
pdftk_path="/usr/local/bin/pdftk" # full path to pdftk binary
pdf_infokeys="~/pdf-infokeys" # full path to file containing new metadata
pdf_search_path="/var/www/html" # path to search for pdf files
pdf_temp_path="/tmp" # temporary directory
InfoKey: Title
InfoValue: ZZZZZ
InfoKey: Subject
InfoValue: ZZZZZ
InfoKey: Keywords
InfoValue: ZZZZZ
InfoKey: Author