Skip to content

Instantly share code, notes, and snippets.

View kello3000's full-sized avatar
🤔

Henrik Häkkä kello3000

🤔
View GitHub Profile
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query
@kello3000
kello3000 / adblock.sh
Last active August 29, 2015 14:10 — forked from teffalump/README.md
#!/bin/sh
#Put in /etc/adblock.sh
#Block ads, malware, etc.
#Need pkill installed
if command -v pkill > /dev/null
then
echo 'Found pkill!'
else