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
Instale o Oracle VirtualBox | |
http://www.virtualbox.org/wiki/Downloads | |
Instale o Ruby + RubyGems | |
(recomendo usar o RVM https://rvm.io/) | |
Abra o terminal e execute os seguintes comandos: | |
(instalação do Vagrant - http://vagrantup.com/) | |
$ gem install vagrant |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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] |
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
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
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
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
#!/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
sudo apt-get install g++ | |
sudo svn checkout http://v8.googlecode.com/svn/trunk/ /usr/local/v8 | |
cd /usr/local/v8 | |
make dependencies | |
make [arch] snapshot=on gdbjit=on liveobjectlist=on debuggersupport=on | |
sudo scons |
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
#configuring phantomJS | |
$ cd /usr/local | |
$ sudo git clone git://github.com/ariya/phantomjs.git && cd phantomjs | |
$ sudo ./build.sh | |
sudo ln -s /usr/local/phantomjs/bin/phantomjs /usr/local/bin/phantomjs | |
export PHANTOMJS_BIN=/usr/local/bin/phantomjs | |
OlderNewer