Skip to content

Instantly share code, notes, and snippets.

@hsribei
hsribei / putting-the-tor-back-in-torrent.md
Last active January 18, 2017 22:08
Putting the "Tor" back in Torrent

Putting the "Tor" back in Torrent

How a Popcorn Time fork patch could incentivize people to run thousands of new Tor relays

This is a follow-up to this discussion: Can NAT traversal be Tor's killer feature?

If torrents are P2P's killer application, and NAT traversal/"static IP" are Tor's (via hidden services), putting them together could prove to be the best incentivization scheme for growing the Tor network other than cold crypto cash.

You're stupid

Everybody knows you're not supposed to use torrents with tor, right?

@floehopper
floehopper / eastcoast-train-positions.html
Created April 25, 2011 08:22
East Coast Train Positions
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map = null;
function initializeMap() {
$.getJSON("http://www.ombord.info/api/jsonp/position/?callback=?", function(gpsData) {
var currentPosition = new google.maps.LatLng(gpsData.latitude, gpsData.longitude);
map = new google.maps.Map(document.getElementById("map_canvas"), {
@iiie
iiie / qr2f.py
Last active June 1, 2019 08:52
#!/usr/bin/env python
"""
Dependancies:
pip install "qrtools==1.4" "pyotp==2.2.6" "urllib3==1.23"
Usage:
qr2f.py /path/to/screenshot1 [screenshot2 [screenshot3]]
"""
import urllib
import qrtools
@jjmaestro
jjmaestro / whisper-calculator.py
Last active November 26, 2019 07:13
whisper-calculator.py: Calculates the size of the whisper storage for the given retention (in frequency:history format)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 * 60,
'h': 1 * 60 * 60,
@saliceti
saliceti / pre-commit
Last active March 12, 2021 18:38
Git pre-commit hook to check for AWS keys
#!/usr/bin/env bash
# Install globally using https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook
# The checks are simple and can give false positives. Amend the hook in the specific repository.
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@ktheory
ktheory / check_aws_status.rb
Created January 13, 2012 05:11
Nagios plugin to check AWS Status RSS feeds
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'net/http'
# check_aws_status.rb
# A nagios plugin for fetching RSS feeds from http://status.aws.amazon.com.
# Source: https://gist.github.com/1604786
# Written by Aaron Suggs: https://github.com/ktheory
@countingpine
countingpine / ext2scan.c
Last active December 19, 2021 18:06
ext2scan: scan for ext2/ext3/ext4 partitions
/* ext2scan:
* Scans an input stream, sector by sector, for something that looks like an ext{2,3,4} partition.
* It does this by looking for a magic WORD, 0xEF53, at a known offset into the sector.
* For random data, this will occur by chance around once per 32MB of data, so we also
* check whether the first two sectors are all zeros, which is commonly true for ext partitions.
*
* Compile with:
* gcc ./ext2scan.c -o ./ext2scan
*
* Example usage:
anonymous
anonymous / vboxEmulateHost.py
Created June 2, 2016 08:09
VirtualBox - Emulate HOST based on DMI, ACPI tables (DSDT, SSDT and SLIC) and NIC MAC address
#!/usr/bin/env python
"""
CREDITS GO TO (and most certainly others):
http://blog.michaelboman.org/2014/01/making-virtualbox-nearly-undetectable.html
http://www.kernelmode.info/forum/viewtopic.php?f=11&t=3478
"""
import re
import random
@PiDelport
PiDelport / slack-web-workspace-sidebar.user.js
Last active December 28, 2022 18:06
Slack Web Workspace Sidebar
// ==UserScript==
// @name Slack Web Workspace Sidebar
// @description Enable the workspace sidebar on the web version of Slack.
// @namespace https://github.com/PiDelport/
// @author Pi Delport <pjdelport@gmail.com>
// @version 1.0
// @license MIT
// @homepageURL https://gist.github.com/PiDelport/513676916e8fc186a09edfc8965a410b
// @match https://app.slack.com/*
// ==/UserScript==