Skip to content

Instantly share code, notes, and snippets.

Avatar

Léo Peltier L-P

View GitHub Profile
@alirobe
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 https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# 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
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 https://github.com/ocornut/imgui/issues/306 for details
// And more fancy node editors: https://github.com/ocornut/imgui/wiki#Useful-widgets--references
// Changelog
// - v0.04 (2020-03): minor tweaks
// - v0.03 (2018-03): fixed grid offset issue, inverted sign of 'scrolling'
#include <math.h> // fmodf
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active Sep 27, 2020
HTTP Streaming (or Chunked vs Store & Forward)
View http_streaming.md

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
magnetikonline / README.md
Last active Sep 28, 2020
Setting Nginx FastCGI response buffer sizes.
View README.md
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active Sep 27, 2020
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

Description

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:

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

Results

@plentz
plentz / nginx.conf
Last active Sep 29, 2020
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
@lewg
lewg / block_china_ufw.sh
Created Jan 18, 2013
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
View block_china_ufw.sh
#!/bin/sh
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html
# Cambodia (KH)
ufw deny from 114.134.184.0/21 to any port 22
# Chinese (CN) IP addresses follow:
ufw deny from 1.192.0.0/13 to any port 22
ufw deny from 1.202.0.0/15 to any port 22
@kidbrax
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
end
contains_point = false
i = -1
j = polygonPoints.size - 1
You can’t perform that action at this time.