Skip to content

Instantly share code, notes, and snippets.

View christianhanne's full-sized avatar

Christian Hanne christianhanne

View GitHub Profile
@plentz
plentz / nginx.conf
Last active July 27, 2024 16:11
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ddutchie
ddutchie / Flashlight.mm
Last active March 12, 2024 10:20
Native Flash Light Controller for Unity3D and iOS
#import <AVFoundation/AVFoundation.h>
extern "C" {
void _EnableFlashlight(bool enable) {
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
if ([device hasTorch]) {
[device lockForConfiguration:nil];
[device setTorchMode:enable ? AVCaptureTorchModeOn : AVCaptureTorchModeOff];
[device unlockForConfiguration];