Skip to content

Instantly share code, notes, and snippets.

View joellobo's full-sized avatar

Joel Lobo joellobo

View GitHub Profile
#!/bin/bash
cat /dev/null > saida.txt
while read padrao
do
grep "\"$padrao\"" filiados.csv >> saida.txt
done < pessoas.csv
@jurigis
jurigis / RestProxyTemplate.java
Last active November 7, 2024 18:45 — forked from davidtimmerman/RestProxyTemplate.java
Spring RestTemplate with proxy settings and proxy authentication
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.ProxyAuthenticationStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@subfuzion
subfuzion / curl.md
Last active May 12, 2025 02:55
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@sachin-handiekar
sachin-handiekar / gist:ee015968ed2ae1f5f609
Last active October 9, 2018 01:27
Changing log level in jBoss EAP 6 without restarting the server
  1. Go to $JBOSS_HOME/bin

  2. Run the following command -

     ./jboss-cli.sh --connect controller=localhost:9999
    

Note : If you're using a port offset, the management console port can be calculated as,

port = managementNativeSocket (9999) + port offSet
@voltuer
voltuer / gist:f31298c8bbdf71a61e7c
Created June 15, 2015 22:03
Puerto git bloqueado, usar http (para bower o npm)
git config --global url."https://".insteadOf git://
@pranav7
pranav7 / install_chromedriver.md
Last active April 8, 2021 13:03
Installing Chromedriver and setting up Cucumber to run with Chrome on Linux/Ubuntu

Follow the below steps to install chrome webdrivers on Ubuntu

  • Install Unzip

sudo apt-get install unzip

  • Assuming you're running a 64-bit OS, download the latest version of chromedriver from their website

wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip -P ~/Downloads unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads

# Mais usados --
alias ga="git add"
alias gc="git commit -m"
alias gca="git commit -am"
alias gs="git status"
alias gp="git push"
alias gpl="git pull"
# Diff --
alias gd="git diff"
@alexandreaquiles
alexandreaquiles / UploadArquivoServlet.java
Last active April 11, 2025 13:59
Servlet que faz upload de arquivos no diretório configurado no init-param "diretorio", utilizando a biblioteca commons-fileupload.
package upload;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
@rpietro
rpietro / legenda_Cine_Holliudy.srt
Created January 20, 2014 05:44
legenda cine holliudy
1
00:03:59,000 --> 00:04:01,037
ÉÉÉgua, pai!
Essa história é muito joiada!
2
00:04:01,302 --> 00:04:03,707
E os ninjas eram mais invocados
do que corrida de pato!
@coffeemug
coffeemug / gist:6168031
Last active October 15, 2024 01:08
The fun of implementing date support
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.