Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcel Schlegel schlegel11

View GitHub Profile
@plentz
plentz / nginx.conf
Last active May 7, 2021
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@asabaylus
asabaylus / gist:3071099
Created Jul 8, 2012
Github Markdown Heading Anchors
View gist:3071099

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@ErikAugust
ErikAugust / spectre.c
Last active Apr 29, 2021
Spectre example code
View spectre.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@apollolm
apollolm / nginx-ssl-config
Last active Apr 12, 2021
Nginx Configuration with multiple port apps on same domain, with SSL.
View nginx-ssl-config
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@borgfriend
borgfriend / maya2017install.sh
Last active Feb 21, 2021
Maya 2017 Installation on Ubuntu 16.04
View maya2017install.sh
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
@whosaysni
whosaysni / gist:5733660
Created Jun 8, 2013
Hello world with Xlib.
View gist:5733660
/*
hellox -- Hello world with Xlib.
$(CC) -o hellox hellox.c -lX11 -L/usr/X11/lib
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@jewelsea
jewelsea / BoundsPlayground.java
Created Dec 7, 2011
Demo for understanding JavaFX Layout Bounds
View BoundsPlayground.java
import javafx.application.Application;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
View TableViewExt.java
import java.util.LinkedHashSet;
import javafx.collections.ObservableList;
import javafx.scene.control.TableRow;
import javafx.scene.control.TableView;
import javafx.util.Callback;
/**