Skip to content

Instantly share code, notes, and snippets.

@Someguy123
Someguy123 / deswappify.pl
Last active February 11, 2024 19:34 — forked from WGH-/deswappify.pl
#!/usr/bin/perl
use strict;
use Fcntl qw(SEEK_SET);
sub deswappify {
my $pid = shift;
my $fh = undef;
my $start_addr;
@jhass
jhass / README.md
Last active December 6, 2023 06:46 — forked from yorkxin/README.md
Proxy to remote server with CORS support

cors.py for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.

Usage

Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.

Run:

@sidnei
sidnei / gist:7041338
Last active May 8, 2021 12:36
Using lvm thin provisioning
# Using lvm thin provisioning, per https://github.com/lxc/lxc/pull/67
# First we create a volume group to hold the thin pool
$ sudo vgcreate lxc /dev/sde3
# Then create a thin-pool named 'tp' within that volume group
$ sudo lvcreate -l 90%VG --type thin-pool --thinpool tp lxc
@SquidLord
SquidLord / egps.lua
Last active January 23, 2024 18:33
egps: A* pathfinding library for Minecraft ComputerCraft turtles.
-- This library provide high level turtle movement functions.
--
-- Before being able to use them, you should start the GPS with egps.startGPS()
-- then get your current location with egps.setLocationFromGPS().
-- egps.forward(), egps.back(), egps.up(), egps.down(), egps.turnLeft(), egps.turnRight()
-- replace the standard turtle functions.
-- If you need to use the standard functions, you
-- should call egps.setLocationFromGPS() again before using any egps functions.
-- Gist at: https://gist.github.com/SquidLord/4741746
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.