Skip to content

Instantly share code, notes, and snippets.

Avatar

Dennys dennysfredericci

View GitHub Profile
@dennysfredericci
dennysfredericci / find.sh
Created Jul 9, 2018
Find class in jar fiels
View find.sh
find ./ -name "*.jar" | xargs grep org/springframework/data/mapping/context/MappingContext.class
View ApplicationHelper.rb
module ApplicationHelper
def teste
#profile_url = Net::HTTP.get_response(URI.parse("http://graph.facebook.com/#{100000335750045}/picture?type=large"))['location']
#second_image = Net::HTTP.get_response(URI.parse("https://taylorgraceauthor.files.wordpress.com/2015/11/6917465-french-flag-wallpaper.jpg"))['location']
#Deve ter transparencia
first = "#{Rails.public_path}/mask.png"
View FIX41.xml
<fix major="4" minor="1">
<header>
<field name="BeginString" required="Y"/>
<field name="BodyLength" required="Y"/>
<field name="MsgType" required="Y"/>
<field name="SenderCompID" required="Y"/>
<field name="TargetCompID" required="Y"/>
<field name="OnBehalfOfCompID" required="N"/>
<field name="DeliverToCompID" required="N"/>
<field name="SecureDataLen" required="N"/>
@dennysfredericci
dennysfredericci / TibcoListener.java
Created Oct 16, 2014
Tibco Rendezvous Listener Sample
View TibcoListener.java
package br.com.fredericci.test;
import java.util.Date;
import com.tibco.tibrv.Tibrv;
import com.tibco.tibrv.TibrvException;
import com.tibco.tibrv.TibrvListener;
import com.tibco.tibrv.TibrvMsg;
import com.tibco.tibrv.TibrvMsgCallback;
import com.tibco.tibrv.TibrvRvdTransport;
@dennysfredericci
dennysfredericci / TibcoSender.java
Created Oct 16, 2014
Tibco Rendezvous Sender Sample
View TibcoSender.java
package br.com.fredericci.test;
import com.tibco.tibrv.Tibrv;
import com.tibco.tibrv.TibrvMsg;
import com.tibco.tibrv.TibrvRvdTransport;
public class TibcoSender
{
public static void main(String[] args) throws Exception
@dennysfredericci
dennysfredericci / search-ul-li-item.js
Created Jul 22, 2014
A simple jquery code to search a text inside of li tag
View search-ul-li-item.js
//searchText is a input type text
$('#searchText').bind('keyup', function() {
var searchString = $(this).val();
$("ul li").each(function(index, value) {
currentName = $(value).text()
if( currentName.toUpperCase().indexOf(searchString.toUpperCase()) > -1) {
@dennysfredericci
dennysfredericci / machine_learning.rb
Created Jul 21, 2014
Machine Learning example using libsvm
View machine_learning.rb
#gem install rb-libsvm
require 'libsvm'
class Predictor
def initialize
parameter = Libsvm::SvmParameter.new
parameter.cache_size = 3 # in megabytes
@dennysfredericci
dennysfredericci / application.html.erb
Created Apr 21, 2014
A simple html page to read informations from facebook
View application.html.erb
<html>
<head>
<title>Fluid Canvas HTML Example </title>
</head>
<body>
<div id="allContent" class="span12">
<form class="form-horizontal">
View XmlFormatter.java
import java.io.File;
import java.io.FileWriter;
import org.jdom2.Document;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
public class XmlFormatter
@dennysfredericci
dennysfredericci / web.xml
Created Jul 2, 2013
web.xml spec 3.0 sample
View web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      version="3.0">
       
  <servlet>
   <display-name>Servlet1</display-name>
   <servlet-name>Servlet1</servlet-name>
   <servlet-class>test.Servlet1</servlet-class>
   <init-param>