Skip to content

Instantly share code, notes, and snippets.

@JSchaenzle
JSchaenzle / RapidXmlExample.c
Created May 18, 2012 18:37
RapidXml example parsing beer journal
#include <string.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <vector>
#include "rapidxml-1.13/rapidxml.hpp"
using namespace rapidxml;
using namespace std;
@jordelver
jordelver / gist:3139365
Created July 18, 2012 22:29
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@withzombies
withzombies / trustmemore
Created January 20, 2014 04:06
trustmemore
#!/usr/bin/env python
import os
import sys
import pwd
import random
import struct
import paramiko
import tempfile
import SocketServer
@sarciszewski
sarciszewski / gist:10908080
Created April 16, 2014 17:06
Serve and Destroy
<?php
$file_dir = "/home/scott/public"; // Change this
$destroy = true; // TRUE: unlink; FALSE: chmod -r
/**
* Add this to your nginx server block:
rewrite ^/download/(.*)$ /serve_and_destroy.php?file=$1;
**/
function get_file_extension($path) {
$split = explode('.', strtolower($path));
@joshblack
joshblack / minix.md
Last active August 29, 2015 14:06
Mount MINIX3 Files
@jhaddix
jhaddix / all.txt
Last active July 29, 2024 06:49
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
0