Skip to content

Instantly share code, notes, and snippets.


Léo Peltier L-P

View GitHub Profile
alirobe / reclaimWindows10.ps1
Last active Sep 29, 2020
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of (different defaults). N.…
View reclaimWindows10.ps1
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <>
# Modified by: alirobe <> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source:
# Tweaked Source:
# Tweak difference:
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
View nodes.cpp
// ImGui - standalone example application for Glfw + OpenGL 3, using programmable pipeline
#include <imgui.h>
#include "imgui_impl_glfw_gl3.h"
#include <stdio.h>
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
#include <math.h>
#include <string.h>
#include <vector>
ocornut / imgui_node_graph_test.cpp
Last active Sep 13, 2020
Node graph editor basic demo for ImGui
View imgui_node_graph_test.cpp
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code! This is more of a demo of how to use Dear ImGui to create custom stuff.
// See for details
// And more fancy node editors:
// Changelog
// - v0.04 (2020-03): minor tweaks
// - v0.03 (2018-03): fixed grid offset issue, inverted sign of 'scrolling'
#include <math.h> // fmodf
CMCDragonkai /
Last active Sep 27, 2020
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

magnetikonline /
Last active Sep 28, 2020
Setting Nginx FastCGI response buffer sizes.
lelandbatey /
Last active Sep 27, 2020
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


plentz / nginx.conf
Last active Sep 29, 2020
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
lewg /
Created Jan 18, 2013
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# Based on
# Cambodia (KH)
ufw deny from to any port 22
# Chinese (CN) IP addresses follow:
ufw deny from to any port 22
ufw deny from to any port 22
kidbrax / point-in-polygon.rb
Created Sep 22, 2011
Check whether a point is within a polygon #ruby
View point-in-polygon.rb
def point_in_polygon?(polygonPoints)
return false if self.latitude.blank? or self.longitude.blank?
polygonPoints.each do |point|
point[0] = point[0].to_f
point[1] = point[1].to_f
contains_point = false
i = -1
j = polygonPoints.size - 1
You can’t perform that action at this time.