This is a SCRIPT-8 cassette.
This file contains 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
'Trigger off event ID 10000 (Network Connected) to check if we're on the papercut network, and if | |
'PaperCut client is running. If it's not, try to start it. | |
strSearchSuffix = "REPLACE_WITH_DOMAIN_SUFFIX_TO_CHECK" | |
strFindProcessName = "pc-client.exe" | |
wscript.sleep 5000 'sleep 5 seconds to allow network to configure | |
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") | |
Set objShell = CreateObject("WScript.Shell") |
This file contains 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
(my $x1, my $x2, my $x3, my $x4, my $x5) = ($args->{'search'} =~ /(youtu be\/|youtube com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/); | |
if ($x5) { | |
$url = 'youtube://' . $x5; | |
} |
This file contains 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/env python | |
from __future__ import print_function | |
from future.standard_library import install_aliases | |
install_aliases() | |
from urllib.parse import unquote | |
import select, socket | |
import cec | |
config = { | |
'lms_server': ('192.168.1.10', 9090), # IP of your Squeeze Server, and the network control port (usually 9090) |
This file contains 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
use strict; | |
use warnings; | |
my $data = foo(); | |
print "$data\n"; | |
print "$data->{song_hits}\n"; | |
print "$data->{song_hits}[0]\n"; | |
for my $hit (@{$data->{song_hits}}){ | |
print "$hit->{track}->{title}\n"; | |
} |
This file contains 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
use strict; | |
use warnings; | |
my $data = search("radiohead"); | |
print "$data\n"; | |
print "$data->{song_hits}\n"; | |
print "$data->{song_hits}[0]\n"; | |
for my $hit (@{$data->{song_hits}}){ | |
print "$hit->{track}->{title}\n"; | |
} |
This file contains 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
#commentflag // ; Change to C++ comment style | |
// Code stolen from http://superuser.com/questions/1029053/autohotkey-scrolling-middle-click-mouse-acceleration/1029054 | |
// Thanks to http://superuser.com/users/276424/user21820 for writing this | |
// Licence: CC-BY-SA as per StackExchange code licence prior to Feb 2016. | |
// Settings // | |
global rightbuttonscroll:=0 // set to 1 iff the right button is to be used for scrolling instead of the middle button | |
global scrollbeforeclick:=1 // set to 1 iff scrolling is allowed before the original button click otherwise scrolling is delayed for (clicklimit) | |
global leftrighttomiddle:=0 // set to 1 iff rightbuttonscroll==1 and pressing both left+right buttons together generates middle button press |
This file contains 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
# first use setup: run: | |
# gdrive-windows-x64.exe --config C:\programdata\GDrive about | |
# in order to setup auth token | |
# usage: backup-to-drive.ps1 -file backup_file [-delete_file] [-folder_id FOLDER_ID] | |
# -delete-file switch will delete the local copy once uploaded and verified | |
# -folder_id FOLDER_ID will upload to a specific folder on Google Drive (specify the ID from the URL of the folder) | |
# -email_server, -email_from and -email_to can be specified for notifications, or hard-code them here. | |
# if backup_file is a folder, then it will upload all items within that folder (and delete all of them if specified) |
This file contains 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/env python3 | |
import pychromecast | |
import threading | |
import cec | |
import time | |
# Configurable options | |
TIMEOUT = 300 # timeout in seconds | |
CEC_DEV_ADDRS = [5] # the device addresses of the devices you want to power off |
This file contains 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 | |
from flask import Flask | |
import signal | |
from time import sleep | |
from datetime import datetime | |
vidproc = None | |
def start(): | |
cmd = "raspivid -c -o out.h264 -s -t 120000 -fps 30 -rot 180 -w 1920 -h 1080 -b 15000000" |
OlderNewer