Skip to content

Instantly share code, notes, and snippets.

"ronei ronei".replaceAll("\\s+(?=\\s)", "")
Criar arquivo "/usr/share/applications/eclipse.desktop" com:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon={diretorio do icone}
Exec=sh -c 'export SWT_GTK3=0; export ANDROID_HOME=/usr/local/android-sdk/; {diretorio do eclipse}/eclipse'
Name=Eclipse
@roneigebert
roneigebert / Passos
Last active May 6, 2016 18:18
Charles - Exclusão de sites
No menu ir em Proxy -> Recording Settings
Exclude e em Import e seelcionar o arquivo XML
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName host-origem-na-porta-80.com.br
ProxyPass / http://host-de-destino:8080/
ProxyPassReverse / http://host-de-destino:8080/
</VirtualHost>
#!/usr/bin/python
from BaseHTTPServer import BaseHTTPRequestHandler
import SocketServer
import logging
PORT = 80
class ServerHandler(BaseHTTPRequestHandler):
@roneigebert
roneigebert / Csv.php
Last active June 14, 2016 18:33
Php Csv
<?php
class Csv{
private $output;
private $delimiter;
function __construct($file_name, $delimiter = ';'){
$this->output = fopen('php://output', 'w');
$this->delimiter = $delimiter;
character_set_client: utf8
character_set_connection: utf8
character_set_database: utf8
character_set_filesystem: binary
character_set_results: utf8
character_set_server: utf8
collation_connection: utf8_unicode_ci
collation_server: utf8_unicode_ci
init_connect: set time_zone = '-03:00';
app.factory('utils', function() {
return {
validCpf: function(cpf) {
if ( !cpf || cpf.length != 11
|| cpf == "00000000000"
|| cpf == "11111111111"
|| cpf == "22222222222"
|| cpf == "33333333333"
|| cpf == "44444444444"
|| cpf == "55555555555"
@roneigebert
roneigebert / query-params.js
Last active March 30, 2019 22:24
JS utilities
// Get query parameters with js
var QueryParameters = {
all: function() {
var result = {}
location.search.substr(1).split("&").forEach(function (item) {
var keyValue = item.split("=")
result[keyValue[0]] = decodeURIComponent(keyValue[1])
})
<profiles>
<profile>
<id>run-app</id>
<properties>
<config.skip.tests>true</config.skip.tests>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.skullabs.kikaha</groupId>