Skip to content

Instantly share code, notes, and snippets.

Avatar

juan rojas jnmronquillo

View GitHub Profile
@jnmronquillo
jnmronquillo / device.cpp
Last active Feb 22, 2019
Snippet from method CBiometricDevice::CreateUsbIoTargets From Line 582
View device.cpp
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 Feb 20, 2019
log file on Window 10 Pro Version 1709
View setupapi.dev.log
[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 Feb 19, 2019
jnm_setupapi.dev.log
View 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]
View change-log-posweb.xml
<?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"/>
View MyDefaultRequestTransport.java
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;
View PasswordEncryptionService.java
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;
@jnmronquillo
jnmronquillo / MyRealm.java
Created Mar 15, 2013
Custom realm for static roles
View MyRealm.java
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 Mar 15, 2013
Custom Realm for dinamic roles
View MyRealm
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;
View HTTPStatusCodeAuthenticationFilter.java
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;
View MyShiroWebModule.java
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 {
You can’t perform that action at this time.