Skip to content

Instantly share code, notes, and snippets.

View jjYBdx4IL's full-sized avatar

jjYBdx4IL jjYBdx4IL

View GitHub Profile
@jjYBdx4IL
jjYBdx4IL / PurgeStandbyList.cpp
Created December 2, 2020 17:53 — forked from bitshifter/PurgeStandbyList.cpp
Command line utility for purging Window's standby list. Requires /MANIFESTUAC:"level='highestAvailable'.
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L)
typedef enum _SYSTEM_INFORMATION_CLASS {
SystemMemoryListInformation = 80, // 80, q: SYSTEM_MEMORY_LIST_INFORMATION; s: SYSTEM_MEMORY_LIST_COMMAND (requires SeProfileSingleProcessPrivilege)
} SYSTEM_INFORMATION_CLASS;
@jjYBdx4IL
jjYBdx4IL / autodeploy.sh
Created September 9, 2017 16:16
fast container reload mechanism for wildfly 11 and glassfish 4 using inotifywait and rest managment apis
#!/bin/bash
set -x
webappdir=`pwd`/target/jersey-war-example-1.0-SNAPSHOT
iswildfly=0
if curl http://localhost:9990/ ; then
iswildfly=1
fi
@jjYBdx4IL
jjYBdx4IL / MavenDependencyResolutionExampleMojo.java
Created June 8, 2017 18:15
maven plugin mojo example demonstrating project dependency resolution
/*
* Copyright (C) 2017 jjYBdx4IL (https://github.com/jjYBdx4IL)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jjYBdx4IL
jjYBdx4IL / gist:7caaaf8d78841bd212ce5930a4734762
Last active March 3, 2018 20:11
NVENC support in ffmpeg and missing nvEncodeAPI.h

nvEncodeAPI.h is nowadays hidden somewhere on nVidia's website and not quite as accessible as one would wish. However, due to its open license, that header file now is part of ffmpeg itself (nvenc.h in the libavcodec submodule). Just make sure you get some recent version of ffmpeg sources. I tried version 3.3.beta or something like that and it worked. Hopefully, most distributions will soon provide out-of-the-box NVENC support because of that.

apt-get build-dep ffmpeg
wget https://github.com/FFmpeg/FFmpeg/archive/master.zip
cd FFmpeg-master
./configure --enable-shared --enable-gpl --enable-libass --enable-libfreetype --enable-libx264 \
--enable-libx265 --enable-nvenc --enable-nonfree --enable-libfdk-aac --disable-static --disable-debug \
--prefix=/opt/obs-local --enable-cuda
make -j4