Skip to content

Instantly share code, notes, and snippets.

@queeup
queeup / modify_OpenELEC_squashfs.sh
Created April 15, 2012 16:52
Modify OpenELEC SYSTEM squashfs filesytem
#!/bin/sh
if [ ! $@ ]; then
echo "Need OpenELEC archive file. Exiting!"
exit 0
fi
if [ ! `which mksquashfs` ]; then
echo "Your system doesn't seem to have squashfs-tools installed"
echo "You can install this package with:"
@queeup
queeup / bits.py
Last active December 10, 2015 16:19
Check if system is 32bit or 64bit
#!/usr/bin/env python
if isinstance(0xffffffff, long):
print("%2d\n" % 32)
else:
print("%2d\n" % 64)
@queeup
queeup / ssdp.py
Created October 20, 2013 00:48 — forked from dankrause/ssdp.py
import socket
import httplib
import StringIO
class SSDPResponse(object):
class _FakeSocket(StringIO.StringIO):
def makefile(self, *args, **kw):
return self
def __init__(self, response):
r = httplib.HTTPResponse(self._FakeSocket(response))
var dgram = require('dgram'); // dgram is UDP
// Listen for responses
function listen(port) {
var server = dgram.createSocket("udp4");
server.on("message", function (msg, rinfo) {
console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);
});
@queeup
queeup / Toshiba_Sattellite_U400_Z11_DSDT_fix.patch
Created February 4, 2014 13:00
Toshiba Sattellite U400 Z11 DSDT Fix
--- dsdt.dsl 2014-01-18 23:48:44.755559000 +0200
+++ dsdt.dsl.fix 2014-01-19 00:54:41.522926000 +0200
@@ -1459,6 +1459,10 @@
Return (Zero)
}
}
+ Else
+ {
+ Return (Zero)
+ }
@queeup
queeup / cast4xbmc.nemo_action
Created February 22, 2014 00:14
Play local media files on remote XBMC
[Nemo Action]
###################################
#### DEBUGGING:
####
#### Run Nemo with the environment
#### variable NEMO_ACTION_VERBOSE
#### set to get useful log output
#### for debugging your actions
#### Sample file:
@queeup
queeup / shrinkpdf.nemo_action
Created May 7, 2014 11:22
Shrink PDF files with ghostscript command.
[Nemo Action]
###################################
#### DEBUGGING:
####
#### Run Nemo with the environment
#### variable NEMO_ACTION_VERBOSE
#### set to get useful log output
#### for debugging your actions
#### Sample file:
@queeup
queeup / magpi_downloader.py
Last active November 7, 2016 00:04
MagPi issue downloader
#!/usr/bin/env python
import os
import shutil
import requests
import subprocess
import re
from bs4 import BeautifulSoup as BS4
HOME_FOLDER = os.path.expanduser('~')
@queeup
queeup / natgeo-photo_of_the_day.desktop
Last active December 24, 2019 10:16
Auto wallpaper changer for National Geographic - Photo of the day
[Desktop Entry]
Type=Application
Exec=natgeo-photo_of_the_day.py
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=NatGeo Photo of the day - Wallpaper
Comment=Auto wallpaper changer for National Geographic - Photo of the day
@queeup
queeup / remove-completed-torrents.sh
Created November 1, 2019 21:53 — forked from Luismcplopes/remove-completed-torrents.sh
Transmission-Daemon: Remove or/and Move Completed Torrents
#!/bin/sh
# https://community.wd.com/t/guide-auto-removal-of-downloads-from-transmission-2-82/93156
# script to check for complete torrents in transmission folder, then stop and move them
# either hard-code the MOVEDIR variable here…
# MOVEDIR=/home/amhiserver/.box # the folder to move completed downloads to
# …or set MOVEDIR using the first command-line argument
# MOVEDIR=%1
#
# auth
# port, username, password