View nba_com_gamerecaps_to_mp4.sh
#!/bin/bash
nba_date=$( \
curl 'https://data.nba.net/10s/prod/v3/today.json' --compressed -s | \
jq .links.anchorDate \
)
num_of_games=$( \
curl 'https://data.nba.net/prod/v2/calendar.json' --compressed -s | \
jq ".[$nba_date]" \
View fix_firefox_double_icon.sh
#!/bin/sh
grep StartupWMClass /usr/share/applications/firefox-trunk.desktop || sudo sed -i 's/\[Desktop Entry\]/[Desktop Entry]\nStartupWMClass=Nightly/' /usr/share/applications/firefox-trunk.desktop
View ad7.js
#!/usr/bin/env node
// Newest version is in https://github.com/assafmo/ad7
// Install: sudo npm install -g addic7ed-api
// Usage: node ad7.js "the flash" 4 8
// Usage 2: chmod +x ad7.js; ./ad7.js "the flash" 4 8
// Usage 3: chmod +x ad7.js; mv ad7.js /usr/local/bin/ad7; ad7 "the flash" 4 8
// Usage 4: seq 1 4 | xargs -n 1 ad7 "the flash" 4
View scaling_governor_performance.sh
#!/bin/sh
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
View mac.conf
# Put in /etc/NetworkManager/conf.d/mac.conf
[device]
wifi.scan-rand-mac-address=yes
[connection]
wifi.cloned-mac-address=random
ethernet.cloned-mac-address=random
View aria2-inorder.conf
# To download video/music files
# Put in ~/.aria2/aria2-inorder.conf
# Usage: aria2c --conf-path ~/.aria2/aria2-inorder.conf "$URL"
continue=true
split=8
max-connection-per-server=8
min-split-size=1M
stream-piece-selector=inorder
View espn_nba_scoreboard_to_mp4.sh
#!/bin/bash
curl 'http://www.espn.com/nba/scoreboard' --compressed -s | \
grep -Eo '\{"leagues.+}' | \
jq -r '.events | '\
'map(.competitions | '\
'map(.headlines | '\
'map(.video | '\
'map(if .tracking.coverageType == "Final Game Highlight" then '\
'.links.source.HD.href else empty end))))[][][][]' 2> /dev/null
View check_street_view.sh
#!/bin/sh
lat=$1
long=$2
ans=$(curl "https://maps.googleapis.com/maps/api/js/GeoPhotoService.SingleImageSearch?pb=!1m5!1sapiv3!5sUS!11m2!1m1!1b0!2m4!1m2!3d$lat!4d$long!2d100!3m18!2m2!1sen!2sUS!9m1!1e2!11m12!1m3!1e2!2b1!3e2!1m3!1e3!2b1!3e2!1m3!1e10!2b1!3e2!4m6!1e1!1e2!1e3!1e4!1e8!1e6&callback=_xdc_._2kz7bz" \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36' \
-s --compressed | \
grep -o "Search returned no images")
if [[ -z "$ans" ]]; then
View imdb.sh
#!/bin/sh
name="$1"
curl -s --compressed "https://duckduckgo.com/?q=%5Cimdb $name" | grep -oP 'tt[0-9]+' | head -1
View virustotal.sh
#!/bin/sh
hash="$1"
curl "https://www.virustotal.com/ui/files/$hash" \
-H 'dnt: 1' \
-H 'accept-encoding: gzip, deflate, br' \
-H 'accept-language: en-US,en;q=0.8' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36' \
-H 'accept: application/json' \