Skip to content

Instantly share code, notes, and snippets.

View gelias's full-sized avatar

Guilherme Elias gelias

View GitHub Profile
package cc.routing.gmaps.service
import com.google.maps.DirectionsApi;
import com.google.maps.DirectionsApiRequest;
import com.google.maps.GeoApiContext;
import com.google.maps.model.DirectionsRoute;
import com.google.maps.model.LatLng;
import com.google.maps.model.TravelMode;
public class GMapsDirectionsService {
#!/bin/ruby
full_filename = ARGV[0]
text_to_search = ARGV[1]
fileObj = File.new(full_filename, "r")
while (line = fileObj.gets)
if line.include? text_to_search
puts(line)
end
end
package me.umov.auth;
import me.umov.auth.client.AuthenticationClient;
import me.umov.auth.client.AuthenticationClientImpl;
import me.umov.auth.client.model.LoginResponse;
import me.umov.auth.client.types.ModuleType;
public class AuthorizationTest {
@Test
#!/bin/sh
host=<URL_HOST>
port=<PORT>
cmd="GET http://<URL_DESTINY> HTTP/1.1 Host: www.<URL_HOST>"
( echo open ${host} ${port}
sleep 1
echo -e "\r"
sleep 1
echo ${cmd}
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|GET|CONNECT|POST|HEAD)
RewriteRule .* - [F]
#!/bin/ruby
full_filename = 'file.log'
text_to_search = 'string_to_search'
fileObj = File.new(full_filename, "r")
while (line = fileObj.gets)
if line.include? text_to_search
puts(line)
#!/bin/bash
HOST='host'
USER='username'
PASSWD='password'
REMOTE_FOLDER='remote_folder'
ftp -n -v $HOST << EOT
ascii
user $USER $PASSWD
prompt
@gelias
gelias / build.gradle
Created August 17, 2016 12:54 — forked from alexlafroscia/build.gradle
JUnit Testing with Gradle
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'alex' at '1/27/15 7:02 PM' with Gradle 2.2.1
*
* This generated file contains a commented-out sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at http://gradle.org/docs/2.2.1/userguide/tutorial_java_projects.html
*/
// Apply the java plugin to add support for Java
</dev/urandom tr -dc '123456789!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c32; echo ""
CREATE OR REPLACE FUNCTION do_replication_log(remote_connection_info text, local_connection_info text, schema_name text, last_replication_date_hour timestamp with time zone)
RETURNS timestamp with time zone AS
$BODY$
DECLARE
RegistrosLoop RECORD;
remote_connection_id text;
local_connection_id text;
last_timestamp timestamp with time zone;
has_more_records boolean = false;