Skip to content

Instantly share code, notes, and snippets.

cn cnromaine

  • cn romaine & associates
Block or report user

Report or block cnromaine

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:bd8a85059d41e652fc3079e6f8b75efd
<!DOCTYPE html>
<meta charset="utf-8">
<title>Embedded C# Pad code example</title>
<code class="codepad language-csharp" data-codepad="theme:cobalt" style="width:100%;height:400px;" >//
View Restoring DB .bak's
$path = (get-location).path
$files = get-childitem | where {$_.extension -eq ".bak"}
foreach($file in $files)
$dbPath = $path + '\' + $file
$dbName = $file.ToString().Replace(".bak", "")
write-host "Adding" $dbPath "to db " $dbName
Restore-SqlDatabase -ServerInstance "writeyourserverinstancehere" -Database $dbName -BackupFile $dbPath
cnromaine / BuildingGuiApplicationInPowerSheel .ps
Last active Dec 21, 2015
From Search-Twitter function returns an array of PowerShell objects with properties from the Twitter query. From that data, we extract the text of the tweet and the URL pointing to the Twitter user's profile image. If you look closely at the PowerShell cod…
View BuildingGuiApplicationInPowerSheel .ps
Import-Module .\ShowUI
function Search-Twitter ($q) {
$wc = New-Object Net.Webclient
$url =$q
    ([xml]$wc.downloadstring($url)) | select *
$ws = @{
    WindowStartupLocation = "CenterScreen"
    Width = 500
You can’t perform that action at this time.