Skip to content

Instantly share code, notes, and snippets.

@drsky
drsky / openwrt-lede-on-pc-vm.sh
Created June 2, 2018 15:36 — forked from braian87b/openwrt-lede-on-pc-vm.sh
Instruction to have OpenWRT or LEDE on a X86 PC or Virtual Machine
# ----------------------------------------------------------------------
# Instruction to have OpenWRT or LEDE on a X86 PC or Virtual Machine:
# ----------------------------------------------------------------------
# boot using DamnSmallLinux or similar:
sudo /etc/init.d/ssh start
# see IP to connect using ssh
ifconfig
# set a password for root
su
@drsky
drsky / gist:057f9a7ace0fdb1a54544b9c24d22795
Created May 23, 2018 04:42 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@drsky
drsky / AbstractJdbcRepository.java
Created March 20, 2016 22:49 — forked from criminy/AbstractJdbcRepository.java
Implementation of PagingAndSortingRepository using JdbcTemplate
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
@drsky
drsky / gist:3fc98be0ce51d98fdf96
Created September 23, 2015 08:40
Spring MVC - Response Entity
return new ResponseEntity<String>(HttpStatus.BAD_REQUEST);
return new ResponseEntity<String>(json,HttpStatus.OK);