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 ruby | |
$LOAD_PATH << '.' | |
require 'rest_client' | |
require 'hpricot' | |
require 'config' | |
module ProcessLog |
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 ConsoleApplication1 | |
{ | |
using UrlExtensions; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var html = "http://www.google.com".Request(RequestOptions.KeepTrying); | |
Console.WriteLine(html); |
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.VisualStudio.TestTools.UnitTesting; | |
namespace Fibonacci | |
{ | |
[TestClass] | |
public class FibonacciTests | |
{ | |
[TestMethod] | |
public void TestReturn() | |
{ |
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
require 'uri' | |
require 'net/http' | |
source_url = "http://www.tripsay.com/api/json/tips/Paris,Ile-de-France,France?api_key=TEST&maxResults=5 " | |
url = URI.parse(source_url) | |
path=url.path | |
path=url.path+"?"+url.query | |
post = Net::HTTP::Get.new(path) |
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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" |
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
private static bool FindInFile(string filename, string content) | |
{ | |
using (var reader = XmlReader.Create(filename)) | |
{ | |
var root = XDocument.Load(reader); | |
var nsmgr = new XmlNamespaceManager(reader.NameTable); | |
nsmgr.AddNamespace("ns", "http://www.portalfiscal.inf.br/nfe"); | |
return root.XPathSelectElement("//ns:infCpl", nsmgr).Value | |
.Split(new[] { "Ped_Num:" }, StringSplitOptions.None)[1] |
NewerOlder