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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net.Mail; | |
using System.Net; | |
namespace ConsoleApplication2 | |
{ | |
class Program |
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
public static List<string> GetColumnHeadings() | |
{ | |
List<string> ColumnHeadings = new List<string>(); | |
StreamReader rawFile = new StreamReader(@"filePath"); | |
string stringFile = rawFile.ReadToEnd(); | |
//// | |
//// Split the rows into an array | |
//// |
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
cls | |
$comics = @() | |
foreach($number in 1..25){ | |
$page = (new-object System.Net.Webclient).DownloadString("http://www.awx.co.za/e107_plugins/shop/show_cat.php?lettersort=B&catpath=64/Comics&page=$number") | |
$startIndex = $page.IndexOf("main_section") | |
$startIndex = $page.IndexOf("main_section",$startIndex + 20) |
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
CREATE FUNCTION StripHTMLTags( | |
@HTMLText VARCHAR(MAX) | |
) RETURNS VARCHAR(MAX) | |
AS | |
--========================================================= | |
-- Author : Steven McDonald | |
-- Date : 17 February 2011 | |
-- Description : Removes all HTML tags from provided Text | |
-- Link : Original version - http://blog.sqlauthority.com/2007/06/16/sql-server-udf-user-defined-function-to-strip-html-parse-html-no-regular-expression/ | |
--========================================================= |
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 Watcher(watchDir, processedDir){ | |
this.watchDir = watchDir; | |
this.processedDir = processedDir; | |
}; | |
var events = require('events'); | |
Watcher.prototype = new events.EventEmitter(); | |
var fs = require('fs'), |
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
var path = require('path'), | |
fs = require('fs'), | |
request = require('request'), | |
htmlparser = require('htmlparser'), | |
tasks = []; | |
function getRssFeeds(){ | |
var configFileName = "./rss_feeds.txt"; | |
path.exists(configFileName, function(exists){ | |
if(!exists){ |
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
var fs = require('fs'), | |
completedTasks = 0, | |
tasks = [], | |
wordCounts = {}, | |
filesDir = './text'; | |
function checkIfComplete(){ | |
completedTasks++; | |
if(completedTasks == tasks.length){ | |
for(var index in wordCounts){ |
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
var http = require('http'), | |
url = require('url'), | |
items = [], | |
server; | |
server = http.createServer(function(req, res){ | |
switch(req.method){ | |
case 'POST': | |
AddTodoItem(req, res, items); | |
break; |
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 pull { | |
git fetch origin | |
$part1 = git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3 | |
$part2 = git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 4 | |
if($part2 -ne ""){ | |
$branchName = $part1 + "/" + $part2 | |
} else { | |
$branchName = $part1 | |
} |
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
############################# | |
# Mercilessly copied from https://github.com/kvarv/Continuous-Delivery | |
############################# | |
function TeamCity-TestSuiteStarted([string]$name) { | |
Write-Output "##teamcity[testSuiteStarted name='$name']" | |
} | |
function TeamCity-TestSuiteFinished([string]$name) { | |
Write-Output "##teamcity[testSuiteFinished name='$name']" |
OlderNewer