Skip to content

Instantly share code, notes, and snippets.

View jnmronquillo's full-sized avatar

juan rojas jnmronquillo

View GitHub Profile
@jnmronquillo
jnmronquillo / device.cpp
Last active February 22, 2019 23:27
Snippet from method CBiometricDevice::CreateUsbIoTargets From Line 582
if (SUCCEEDED(hr))
{
//UCHAR NumInterfaces = pIUsbTargetDevice->GetNumInterfaces();
UCHAR NumInterfaces = m_pIUsbTargetDevice->GetNumInterfaces();
TraceEvents(TRACE_LEVEL_INFORMATION,
BIOMETRIC_TRACE_DEVICE,
"%!FUNC! Found %u interfaces",
NumInterfaces
);
@jnmronquillo
jnmronquillo / setupapi.dev.log
Created February 20, 2019 22:32
log file on Window 10 Pro Version 1709
[Device Install Log]
OS Version = 10.0.16299
Service Pack = 0.0
Suite = 0x0100
ProductType = 1
Architecture = amd64
[BeginLog]
[Boot Session: 2019/02/20 16:46:18.500]
@jnmronquillo
jnmronquillo / setupapi.dev.log
Last active February 19, 2019 20:09
jnm_setupapi.dev.log
[Device Install Log]
OS Version = 10.0.17134
Service Pack = 0.0
Suite = 0x0100
ProductType = 1
Architecture = amd64
[BeginLog]
[Boot Session: 2019/02/19 14:48:00.500]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet author="juan" id="1">
<createTable tableName="actualstocks">
<column name="id" type="INTEGER" autoIncrement="true">
<constraints primaryKey="true" primaryKeyName="actualstocks_pkey" nullable="false"/>
package com.img.client.util;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.inject.Inject;
import com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport;
import com.google.web.bindery.requestfactory.shared.ServerFailure;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.util.Arrays;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.AccessControlFilter;
import org.apache.shiro.web.util.WebUtils;
@jnmronquillo
jnmronquillo / MyRealm.java
Created March 15, 2013 18:33
Custom realm for static roles
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.shiro.authc.AuthenticationException;
@jnmronquillo
jnmronquillo / MyRealm
Created March 15, 2013 18:30
Custom Realm for dinamic roles
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import javax.servlet.ServletContext;
import org.apache.shiro.guice.web.ShiroWebModule;
import com.google.inject.Key;
import com.google.inject.name.Names;
public class MyShiroWebModule extends ShiroWebModule {