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
/** | |
* Vkontakte JavaScript API wrapper. | |
* | |
* This script meant for simplify development of Vkontakte applications | |
* using Vkontakte API. Using vk_api() object you can call API methods, | |
* get HTTP-GET parameters (aka flashVars) in a simple way. You don't need | |
* to calculate signature parameter, don't need to form request string, | |
* don't need to implement JSONP-communication. You just connect this script | |
* to HTML-page using <script> tag, call one function to initialize object | |
* and one function to perform API-request! |
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
// early experiments with node had mysterious double requests | |
// turned out these were for the stoopid favicon | |
// here's how to short-circuit those requests | |
// and stop seeing 404 errors in your client console | |
var http = require('http'); | |
http.createServer(function (q, r) { | |
// control for favicon |
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
<# | |
.Synopsis | |
Transfer file/s between file or web servers using BITS (Background Intelligent Transfer Service) | |
.Description | |
This script transfers a file between a file or web server to another file location using BITS. | |
Parameters can specify the Source Server, the Destination Server and the Credentials for the connection. | |
By the usage of wildcard for the Source Server location multiple files can be transferred. | |
.Example | |
Start-TransferFile.ps1 -s "\\serverS\share\file.ext" -d "\\serverD\share" -c "domain\user" | |
Transfers the file "file.ext" from source server "\\serverS\share\" to destination server "\\serverD\share" |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<startup> | |
<supportedRuntime version=".NETFramework,Version=v4.5.2"/> | |
</startup> | |
<runtime> | |
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false" /> | |
</runtime> | |
</configuration> |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<startup> | |
<supportedRuntime version=".NETFramework,Version=v4.6.2"/> | |
</startup> | |
</configuration> |
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
//Notes: | |
//Requires the MMBot.Powershell nuget package | |
//Specify the powershell scripts folder using the MMBOT_POWERSHELL_SCRIPTSPATH key in the ini file | |
//Powershell scripts must be .psm1 (modules) to be executed | |
//Only scripts inside the scripts folder may be executed using this script | |
//Output objects must either support a ToString method or be a string to display properly | |
using MMBot.Powershell; | |
var robot = Require<Robot>(); |
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
//Notes: | |
//Requires the MMBot.Powershell nuget package | |
//Output objects must either support a ToString method or be a string to display properly | |
//It is recommended to use the PowershellModule script instead of this one to control what is executed | |
using MMBot.Powershell; | |
var robot = Require<Robot>(); | |
robot.Respond(@"(ps|powershell) (.*)", 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd"> | |
<en-export export-date="20130730T205637Z" application="Evernote" version="Evernote Mac"> | |
<note> | |
<title>Test Note for Export</title> | |
<content> | |
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> | |
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> | |
Hello, World. |
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
function Show-SessionStateDemo | |
{ | |
[CmdletBinding()] | |
param ( | |
[Parameter()] | |
$Server, | |
[Parameter()] | |
$Database, |
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
Function Select-TableBlob { | |
param( | |
[string]$connectionString="Initial Catalog=Anaqua;Data Source=HFX.anaqua.local;Trusted_Connection=True;", | |
[string]$sqlQuery="SELECT OriginalFile, ThumbNailBlob, ThumbNailBlob FROM FileInformation WHERE ((ThumbNailBlob IS NOT NULL) and (substring(convert(varchar(max),convert(varbinary(max),ThumbNailBlob)), 0, 3) like 'BM'))", | |
[string]$tableName, | |
[string]$blobColumn, | |
[string]$destination=(Get-Location | Split-Path), | |
[int]$blobLimit=10 | |
) | |
[System.Data.SqlClient.SQLConnection]$connection = New-Object System.Data.SqlClient.SQLConnection |