A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
#include <stdio.h> | |
#include <sys/prctl.h> | |
int main(int argc, char **argv) { | |
int dumpable; | |
while(1) { | |
dumpable = prctl(PR_GET_DUMPABLE); | |
printf("The process currently %s dumpable. Press any key to %s dumping.", dumpable ? "is" : "isn't", dumpable ? "disable" : "enable"); | |
getchar(); |
// Use OpenGL 3.0+, but don't use GLU | |
#define GLFW_INCLUDE_GL3 | |
#define GLFW_NO_GLU | |
#include <GL/glfw.h> | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
extern "C" { |
#!/bin/bash | |
FILENAME="private.img"; | |
FILESIZE="100M"; | |
# Create encrypted volume if it doesn't exist | |
if [ ! -f $FILENAME ]; then | |
echo "Creating image file..."; | |
dd if=/dev/zero of=$FILENAME bs=$FILESIZE count=0 seek=1 |
// C/C++ tips for using printf-style functions | |
// Lots of manipulation can be expressed simply and fast with printf-style formatting | |
// Also helps reducing the number of temporaries, memory allocations or copies | |
// ( If you are looking for a simple C++ string class that is printf-friendly and not heap-abusive, | |
// I've been using this one: https://github.com/ocornut/Str ) | |
// If you are interested in a FASTER implementation of sprintf functions, see stb_sprintf.h | |
// https://github.com/nothings/stb/blob/master/stb_sprintf.h | |
// How to concatenate non-zero terminated strings |
<script src="jszip.min.js"></script> | |
<script src="FileSaver.min.js"></script> | |
<script src="https://raw.githubusercontent.com/Stuk/jszip/master/dist/jszip.min.js"></script> | |
<script src="https://raw.githubusercontent.com/eligrey/FileSaver.js/master/FileSaver.min.js"></script> | |
(function (main, modules) { | |
'use strict'; | |
var zip = new JSZip(); | |
for (var property in modules) { |
// Mini memory editor for Dear ImGui (to embed in your game/tools) | |
// Animated GIF: https://twitter.com/ocornut/status/894242704317530112 | |
// THE MEMORY EDITOR CODE HAS MOVED TO GIT: | |
// https://github.com/ocornut/imgui_club/tree/master/imgui_memory_editor | |
// Click "Revisions" on the Gist to see old version. |
# Livesplit hotkeys | |
# | |
"livesplithk Page_Up" | |
Page_Up | |
"livesplithk Page_Down" | |
Page_Down | |
"livesplithk Insert" | |
Insert | |
"livesplithk Delete" | |
Delete |
// vim: set ft=glsl: | |
/* | |
LumaSharpenHook 0.3 | |
original hlsl by Christian Cann Schuldt Jensen ~ CeeJay.dk | |
port to glsl by Anon | |
It blurs the original pixel with the surrounding pixels and then subtracts this blur to sharpen the image. | |
It does this in luma to avoid color artifacts and allows limiting the maximum sharpning to avoid or lessen halo artifacts. |
import peasy.*; | |
PeasyCam cam; | |
float flatrate = 1; | |
float scl = 5; | |
float hue=0; | |
int sat=255; | |
int sat1=255; | |
int br1=255; | |
void setup(){ | |
cam = new PeasyCam(this,0,0,0,1000); |