Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/bin/sh | |
IPT=/sbin/iptables | |
case "$1" in | |
start) | |
$IPT -F INPUT # Flush Input | |
$IPT -F OUTPUT # Flush Output | |
$IPT -F FORWARD # Flush Forward |
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
using Microsoft.SqlServer.TransactSql.ScriptDom; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace TransactSqlScriptDomTest | |
{ |
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
static string ConsoleReadPassword() | |
{ | |
StringBuilder stringBuilder = new StringBuilder(); | |
ConsoleKeyInfo keyInfo = Console.ReadKey(true); | |
while (keyInfo.Key != ConsoleKey.Enter) | |
{ | |
if (keyInfo.Key == ConsoleKey.Backspace) | |
{ | |
stringBuilder.Remove(stringBuilder.Length - 1, 1); |
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
$filterXml = '<QueryList> | |
<Query Id="0" Path="System"> | |
<Select Path="System">*[System[(Level=1 )]]</Select> | |
</Query> | |
</QueryList>' | |
$pcs = (Get-ADComputer -Filter * | ? { Test-Connection $_.DNSHostName -Quiet -Count 1 }).DNSHostName | |
$pcs | % { | |
Get-WinEvent -FilterXml $filterXml -ComputerName $_ | ? TimeCreated -GT (Get-Date).AddMonths(-1) |
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
$pcs = (Get-ADComputer -Filter * | ? { Test-Connection $_.DNSHostName -Quiet -Count 1 }).DNSHostName | |
Invoke-Command -ComputerName $pcs -ScriptBlock { | |
$result = query user | |
$success = $result[1] -match "^[> ]([^ ]+) +([^ ]+) +([0-9]+) +([^ ]+) +([^ ]+) +(.+)$" | |
if ($success) { | |
New-Object PSObject -Property @{ | |
PC = $env:computername; | |
Benutzername = $Matches[1]; | |
Sitzungsname = $Matches[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
$.validator.methods.date = function (value, element) { | |
var extractGermanDate = function (dateString) { | |
var matches = /^(\d{1,2})\.(\d{1,2})\.(\d{4})( (\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/.exec(dateString); | |
if (matches == null) { | |
return false; | |
} else { | |
return { | |
day: matches[1], | |
month: matches[2] - 1, | |
year: matches[3], |
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
namespace Project.Migrations | |
{ | |
using System; | |
using System.Data.Entity.Migrations; | |
public partial class FileTableAdded : DbMigration | |
{ | |
public override void Up() | |
{ | |
Sql(@" |
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
-- ============================================= | |
-- Create or Alter View template | |
-- ============================================= | |
USE <database_name, sysname, AdventureWorks> | |
GO | |
IF OBJECT_ID(N'[<schema_name, sysname, dbo>].[<view_name, sysname, Top10Sales>]', 'V') IS NULL | |
EXEC sp_executesql N'CREATE VIEW [<schema_name, sysname, dbo>].[<view_name, sysname, Top10Sales>] AS SELECT '''' as [x]' | |
GO |
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
SELECT t.[name] AS [Table], | |
c.[name] AS [Column], | |
ex1.[value] AS [Description], | |
CASE | |
WHEN ty.[name] IN ('geometry', 'geography') THEN ty.[name] | |
WHEN ty.[name] IN ('decimal', 'numeric') THEN ty.[name] + '(' + CAST(c.[precision] AS VARCHAR(10)) + ', ' + CAST(c.[scale] AS VARCHAR(10)) + ')' | |
WHEN ty.[max_length] = c.[max_length] THEN ty.[name] | |
WHEN c.[max_length] = -1 THEN ty.[name] + '(MAX)' | |
ELSE ty.[name] + '(' + CAST(c.[max_length] AS VARCHAR(10)) + ')' | |
END AS [Type], |
OlderNewer