Skip to content

Instantly share code, notes, and snippets.

View Batname's full-sized avatar

Batname Batname

  • BatGames
  • Amsterdam
View GitHub Profile
void ACaptureActor::BeginPlay()
{
Super::BeginPlay();
UE_LOG(LogTemp, Warning, TEXT("AMyGameModeBase::BeginPlay()"));
UGameViewportClient* GameViewportClient = GEngine->GameViewport;
FViewport* Viewport = GameViewportClient->Viewport;
ULocalPlayer* LocalPlayer = GEngine->GetDebugLocalPlayer();
void FScene::UpdateSceneCaptureContents(USceneCaptureComponent2D* CaptureComponent)
{
check(CaptureComponent);
if (CaptureComponent->TextureTarget)
{
// Only ensure motion blur cache is up to date when doing USceneCaptureComponent2D::CaptureScene(),
// but only when bAlwaysPersistRenderingState == true for backward compatibility.
if (!CaptureComponent->bCaptureEveryFrame && CaptureComponent->bAlwaysPersistRenderingState)
{
/* UDP echo server program -- echo-server-udp.c */
#include <stdio.h> /* standard C i/o facilities */
#include <stdlib.h> /* needed for atoi() */
#include <unistd.h> /* defines STDIN_FILENO, system calls,etc */
#include <sys/types.h> /* system data type definitions */
#include <sys/socket.h> /* socket specific definitions */
#include <netinet/in.h> /* INET constants and stuff */
#include <arpa/inet.h> /* IP address conversion stuff */
#include <netdb.h> /* gethostbyname */
#define WINVER 0x0500
#include <windows.h>
void ToogleRecordingKeys()
{
// This structure will be used to create the keyboard
// input event.
INPUT ipAlt;
INPUT ipF9;
@Batname
Batname / devices.c
Last active February 13, 2017 20:24 — forked from courtneyfaulkner/devices.c
List OpenCL platforms and devices
#include <stdio.h>
#include <stdlib.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
int main() {
var https = require('https'),
pem = require('pem');
pem.createCertificate({days:1, selfSigned:true}, function(err, keys){
https.createServer({key: keys.serviceKey, cert: keys.certificate}, function(req, res){
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
res.setHeader('content-type', 'text/html');
res.end(`<form target="_parent" action="http://localhost:8001/shopping" class="js-search-box-form"><input class="search-box-q js-search-box-q" type="text" value="" name="q" autocomplete="off" autocorrect="off" autocapitalize="off" maxlength="2048"><input id="qo" type="hidden" name="qo" value="homeSearchBox"><button class="search-box-button" type="submit" section="hdr.search" value="">Search</button></form>`);
}).listen(8000);
var https = require('https'),
pem = require('pem');
pem.createCertificate({days:1, selfSigned:true}, function(err, keys){
https.createServer({key: keys.serviceKey, cert: keys.certificate}, function(req, res){
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
res.setHeader('content-type', 'text/html');
res.end(`<form target="_parent" action="http://localhost:8001/shopping" class="js-search-box-form"><input class="search-box-q js-search-box-q" type="text" value="" name="q" autocomplete="off" autocorrect="off" autocapitalize="off" maxlength="2048"><input id="qo" type="hidden" name="qo" value="homeSearchBox"><button class="search-box-button" type="submit" section="hdr.search" value="">Search</button></form>`);
}).listen(8000);