This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import os, re, requests | |
site = 'http://download.opensuse.org/repositories/devel:/languages:/haskell:/lts:/6/openSUSE_Backports_SLE-12-SP2/x86_64/' | |
response = requests.get(site) | |
if response.status_code == 404: | |
raise Exception('Website not available, HTTP response code: ' + str(response.status_code)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name unobfuscate spiegel plus | |
// @namespace obfuscate | |
// @include http://www.spiegel.de/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var obfcontdiv = document.getElementsByClassName('obfuscated-content'); | |
obfcontdiv[0].setAttribute("class", ""); | |
var elems = document.getElementsByClassName('obfuscated'), t, or, c, i, cc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bad examples: | |
http://colby.id.au/finding-the-local-ip-address-with-ifconfig-and-sed/ | |
http://www.cyberciti.biz/tips/read-unixlinux-system-ip-address-in-a-shell-script.html | |
Better: | |
All except loopback: | |
ip -o a | awk -F': +| +|/' '$2 != "lo" {print $4}' | |
Just eth0: | |
ip -o a | awk -F': +| +|/' '$2 == "eth0" {print $4}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
############################################################ | |
# Script for NETIO power controller | |
# Disables/enables watchdog on port $netio_port | |
# | |
# WS 20110317 | |
# Found on <http://koukaam.se/forum/viewthread.php?forum_id=33&thread_id=1752#3667> | |
############################################################ | |
######## Changes ######## |