Skip to content

Instantly share code, notes, and snippets.

@funkyboy
funkyboy / gist:c273c9d3767ea0e274a0
Created March 20, 2015 14:02
To run BaasBox on Docker
# To pull the image
docker pull funkyboy/baasbox:0.9.2
# To run
docker run -d -p 9000:9000 -v /folder/on/host/machine:/baasbox/db funkyboy/baasbox:0.9.2
@FedericoPonzi
FedericoPonzi / wifikill.sh
Last active January 27, 2020 10:47
A Wifikill made in bash using nmap and arpspoof.
#!/bin/bash
#Federico Ponzi
#doylefermi
#chocolatkey
# GPLv2
usage()
{
echo "Usage: $0 [-all][-list][-i] xxx.xxx.xxx.xxx"
}
@codesections
codesections / main.rs
Last active May 16, 2022 23:48
Warp_proof_of_concept
use futures::{Async, Future, Poll};
use tokio::io::{AsyncRead, AsyncWrite, Error, ReadHalf, WriteHalf};
use tokio::net::TcpStream;
use warp::{path, Filter, Stream};
struct Receiver {
rx: ReadHalf<TcpStream>,
}
impl Stream for Receiver {
type Item = String;
@lebedov
lebedov / mpi4py_pycuda_demo.py
Last active December 2, 2022 04:23
Demo of how to pass GPU memory managed by pycuda to mpi4py.
#!/usr/bin/env python
"""
Demo of how to pass GPU memory managed by pycuda to mpi4py.
Notes
-----
This code can be used to perform peer-to-peer communication of data via
NVIDIA's GPUDirect technology if mpi4py has been built against a
CUDA-enabled MPI implementation.
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@FiloSottile
FiloSottile / La Coscienza di un Hacker
Last active April 2, 2023 23:46
Traduzione in italiano dell'Hacker Manifesto
Questa è una traduzione in italiano del celebre Hacker Manifesto. Tutte quelle
esistenti contengono grossolani errori, perlopiù dovuti ad una carente
comprensione della materia e del periodo, o in ogni caso sono poco fedeli al
contenuto e allo spirito dell'originale. Mi auguro che questa mia traduzione non
soffra degli stessi problemi. Sail strong.
-- FiloSottile
****
Da: Phrack, Volume Uno, Issue 7, Phile 3 of 10

A good commit message looks like this:

Header line: explaining the commit in one line

Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.

The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
@wacko
wacko / gist:5577187
Last active January 6, 2024 07:31
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@simonw
simonw / recover_source_code.md
Last active January 16, 2024 08:13
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)