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
ALTER PROCEDURE [dbo].[TempGetStateItem3] | |
@id tSessionId, | |
@itemShort tSessionItemShort OUTPUT, | |
@locked bit OUTPUT, | |
@lockAge int OUTPUT, | |
@lockCookie int OUTPUT, | |
@actionFlags int OUTPUT | |
AS | |
DECLARE @textptr AS tTextPtr, @length AS int, @extendExpiration bit, @now AS datetime = GETUTCDATE(); |
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
Function Get-WUInstall | |
{ | |
<# | |
.SYNOPSIS | |
Download and install updates. | |
.DESCRIPTION | |
Use Get-WUInstall to get list of available updates, next download and install it. | |
There are two types of filtering update: Pre search criteria, Post search criteria. | |
- Pre search works on server side, like example: ( IsInstalled = 0 and IsHidden = 0 and CategoryIds contains '0fa1201d-4330-4fa8-8ae9-b877473b6441' ) |
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 python2.7 | |
# script by Alex Eames http://RasPi.tv | |
# explained here... | |
# http://raspi.tv/2013/controlled-shutdown-duration-test-of-pi-model-a-with-2-cell-lipo | |
# DO NOT use this script without a Voltage divider or other means of | |
# reducing battery voltage to the ADC. This is exaplained on the above blog page | |
import time | |
import os | |
import subprocess | |
import smtplib |
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
# Finish headless installation via `ssh [email protected]` | |
# See /boot/config.txt | |
sudo apt-get update && sudo apt-get --purge dist-upgrade | |
sudo raspi-config | |
# Add locale en.us-utf8 (but keep en.gb-utf8) | |
sudo dpkg-reconfigure locales | |
# Timezone | |
sudo dpkg-reconfigure tzdata | |
# Update firmware |
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
#Enables use of RDP://servername to open in mstsc | |
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | |
Try {New-Item -Path HKCR:rdp -erroraction stop} | |
Catch {Remove-Item -Path HKCR:rdp -recurse -ErrorAction SilentlyContinue | |
New-Item -Path HKCR:rdp -ErrorAction SilentlyContinue} | |
Finally {$rdp=Get-childitem -Path HKCR:rdp} | |
Try {New-ItemProperty -LiteralPath HKCR:rdp -name '(Default)' -Value "URL:Remote Desktop Protocol <URL:Remote%20Desktop%20Protocol> " -erroraction stop} | |
Catch {Set-ItemProperty -LiteralPath HKCR:rdp -name '(Default)' -Value "URL:Remote Desktop Protocol <URL:Remote%20Desktop%20Protocol> " -ErrorAction SilentlyContinue} | |
Try {New-ItemProperty -LiteralPath HKCR:rdp -name 'EditFlags' -Type DWORD -Value "2" -erroraction stop} | |
Catch {Set-ItemProperty -LiteralPath HKCR:rdp -name 'EditFlags' -Type DWORD -Value "2" -ErrorAction SilentlyContinue} |
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
Add-Type -AssemblyName presentationframework | |
[xml]$XAML = @' | |
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="100" Width="20"> | |
<StackPanel> | |
<TextBox Name="textWeather" /> | |
<Button Name="buttonGet" Content="Get"/> |
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
#============================================================================================== | |
# XAML Code - Imported from Visual Studio Express 2013 WPF Application | |
#============================================================================================== | |
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework') | |
[xml]$XAML = @' | |
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="OS Details" Height="306" Width="525" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize"> | |
<Grid Margin="0,0,-0.2,0.2"> |
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
# ============================================================================== | |
# | |
# Fervent Coder Copyright 2011 - Present - Released under the Apache 2.0 License | |
# | |
# Copyright 2007-2008 The Apache Software Foundation. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use | |
# this file except in compliance with the License. You may obtain a copy of the | |
# License at | |
# |
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-Module WebAdministration | |
$port = 80 | |
$ssl = $false | |
#App Start | |
SetupOptionalVariables | |
SetupAppPools | |
SetupWebSite | |
SetupWebApplication |
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
// pumpOnInterval turn pump on for x | |
const unsigned long pumpOnInterval = (30 * 1000); | |
// pumpOffInterval turn pump off for x | |
const unsigned long pumpOffInterval = (60*60*1000); | |
// Which pins are connected to which LED/Pump | |
const byte pumpPin = 0; | |
const byte ledPin = 1; | |
// Variable holding the timer value so far. One for each "Timer" | |
unsigned long pumpTimer; |
OlderNewer