- O comando abaixo força o git a sempre utilizar o protocolo https em seus downloads:
git config --global url."https://".insteadOf git://
- Configuração de Proxy no GIT:
git config --global http.proxy http://proxyuser:proxypass@prxrj.prevnet:8080
git config --global https.proxy http://proxyuser:proxypass@prxrj.prevnet:8080
- Liberar autenticação do proxy em ambientes sem interface gráfica (Resolve o problema do erro 407 ao realizar requisições):
curl -v -U proxyuser:proxypass -x http://prxrj.prevnet:8080 --url http://www.google.com --proxy-ntlm
- Matar todos os processos Zumbi:
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
class CurrenciesController < ApplicationController | |
# GET /currencies | |
# GET /currencies.xml | |
def index | |
@currencies = Currency.all | |
respond_to do |format| | |
format.html # index.html.erb | |
format.xml { render :xml => @currencies } | |
end |
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
file = File.new("arquivo.rb", "r") | |
while (line = file.gets) | |
puts line | |
end | |
file.close |
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
begin | |
file = File.new("arquivo.rb", "r") | |
while (line = file.gets) | |
puts line | |
end | |
file.close | |
rescue => err | |
puts "Exception: #{err}" | |
err | |
end |
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
<project> | |
... | |
<build> | |
<!-- To define the plugin version in your parent POM --> | |
<pluginManagement> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-resources-plugin</artifactId> | |
<version>2.5</version> |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Gerenciador de Coleções</title> | |
</head> | |
<body> | |
</body> | |
</html> |
Para configurar o filtro Cross Origin no WSO2 é necessário editar o arquivo <APIM_HOME>/repository/deployment/server/webapps/oauth2/WEB-INF/web.xml
, adicionando a seguinte informação no final do arquivo:
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>
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 node | |
var args = process.argv.slice(2); | |
//console.log('Started'); | |
// String startsWith polyfill | |
if (!String.prototype.startsWith) { | |
Object.defineProperty(String.prototype, 'startsWith', { | |
enumerable: false, |
OlderNewer