Skip to content

Instantly share code, notes, and snippets.

View VictorWesterlund's full-sized avatar
🐧
Noot noot

Victor Westerlund VictorWesterlund

🐧
Noot noot
View GitHub Profile
@EngKhaledB
EngKhaledB / Fix Slow NGINX PHP on WSL.md
Last active December 12, 2023 15:30
If you have slow NGINX PHP-FPM performance on Windows Subsytem for Linux (WSL) .. here is the Solution!

1- Locate nginx.conf on your server, which almost on this path /etc/nginx/nginx.conf

2- Add this code under the http block fastcgi_buffering off;

Refrence: microsoft/WSL#2100 (comment)

@wcaleb
wcaleb / waybackup.py
Last active December 29, 2020 06:55
Quick script to save URL to Wayback Machine
#! /usr/bin/env python
import sys, requests
# Usage: Pass URL to script, get back URL to Wayback Machine snapshot
base_url = 'http://web.archive.org'
r = requests.get(base_url + '/save/' + sys.argv[1])
if r.status_code == requests.codes.ok:
@magnetikonline
magnetikonline / dumprequest.php
Last active July 18, 2024 19:50
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']
@in5ikt
in5ikt / versioning-your-saves.md
Created February 8, 2011 22:44
Minecraft - Versioning your saves

Minecraft - Versioning your saves

This is a tutorial show how to version your saves using Git.

Q: Why would anyone go through this process?
A: Because if you do, you can undo an otherwise un-undoable action, such as swimming in a pit of lava and accidentally dropping your Notch armpit forged special edition diamond pickaxe and your 35 stacks of cobblestone.

Step by step tutorial

Download and install the appropriate version of Git