Skip to content

Instantly share code, notes, and snippets.

Avatar
🐺

Sebastián Garcia sebargarcia

🐺
View GitHub Profile
@sebargarcia
sebargarcia / gist:83e6e223cfdc420656fd4be5c28acd98
Last active Apr 24, 2020
Enable / Disable Hyper-V on Window
View gist:83e6e223cfdc420656fd4be5c28acd98
#From command line as administrator RUN
#To turn off HYPER-V
bcdedit /set hypervisorlaunchtype off
Call dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All
#To turn on Hyper-V
bcdedit /set hypervisorlaunchtype auto
Call dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
@sebargarcia
sebargarcia / HelperResource.java
Created Jul 20, 2017 — forked from bowenwr/HelperResource.java
Jersey Pagination Example for Jersey Mailing List Request
View HelperResource.java
public class HelperResource {
public static void setRequestOptions(ContainerRequestContext requestContext, RequestOptions requestOptions) {
requestContext.setProperty("requestOptions", requestOptions);
}
public static boolean isBodyRequested(ContainerRequestContext requestContext) {
// Do not return a body for head methods, but we might want to calculate paging / headers, etc.
// For now this is getting rewritten as GET by Jersey, but it might be changed later:
// https://java.net/jira/browse/JERSEY-2460