- If you need a product key for a windows 8+ device as it didnt come with one and you do not want to download random tools, you can find it in a linux livecd by typing
sudo less /sys/firmware/acpi/tables/MSDN
in the terminal
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
import feedparser, random, os | |
d = feedparser.parse("https://feeds.feedburner.com/BsdNowMp3") | |
episodes = d.entries | |
show = random.choice(episodes).enclosures[0] | |
os.system("mpv " + show['href']) |
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
# A simple python alarm clock | |
# example: python alarm.py [time in 24h with :] [music file] | |
# example: python alarm.py "6:30" "Trollenn.mp3" | |
import time, os, sys | |
ctime = time.strftime("%H:%M") | |
print(ctime) | |
while ctime != sys.argv[1]: | |
ctime = time.strftime("%H,%M") |
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
/*Put this in the child theme or what ever your using's css*/ | |
#videoembed a { | |
color: whitesmoke; | |
} |
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
if e.code == 404: | |
say("Bitcoin Average does not have any data on that currency") | |
elif e.code == 500: | |
say("bitcoinaverage.com had a server error") | |
else: | |
say("I got a " + str(e.code) + " from the server") |
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/bash | |
wget -O 10_resume_wifi https://gist.githubusercontent.com/ioangogo/389f0ff730e3c7a97351b2de3a629352/raw/55976b1c36a9ce06efc035097525ef13189b75c2/10_resume_wifi | |
read -p "Do you want to read the bash script that has just being downloaded and run it:[Y/N] " yn | |
case $yn in | |
[Yy]* ) nano 10_resume_wifi;; | |
[Nn]* ) echo "OK Its your system";; | |
esac | |
sudo bash -c "mv 10_resume_wifi /etc/pm/sleep.d/10_resume_wifi" | |
sudo bash -c "chmod +x /etc/pm/sleep.d/10_resume_wifi" |
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/sh | |
case "${1}" in | |
resume|thaw) | |
service network-manager restart;; | |
esac |
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
import subprocess | |
cmd = 'irsend LIST "" ""' | |
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) | |
tmp = proc.stdout.read() | |
print tmp | |
ntmp = tmp.replace("irsend: ", "") | |
device = ntmp.split("\r\n") |
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
def eightball(info,usrs): | |
responses = ["It is certain","It is decidedly so","Without a doubt","Yes"," definitely","As I see it"," yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","My sources say no","Outlook not so good","Very doubtful"] | |
msg = random.choice(responses) | |
say(msg) |
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
""" | |
Traceback (most recent call last): | |
File "C:\Python34\lib\multiprocessing\pool.py", line 119, in worker | |
result = (True, func(*args, **kwds)) | |
File "C:\Python34\lib\multiprocessing\pool.py", line 44, in mapstar | |
return list(map(*args)) | |
File "C:\Python34\lib\site-packages\himawaripy-1.1-py3.4.egg\himawaripy\himawaripy.py", line 56, in download_chunk | |
with counter.get_lock(): | |
AttributeError: 'NoneType' object has no attribute 'get_lock' | |
""" |